- update manual

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9796 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 12 years ago
parent d4ddc2beeb
commit ef9ade64e8
  1. 26
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/application_states.html
  2. 45
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/collision_and_intersection.html
  3. 8
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/custom_controls.html
  4. 26
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/custom_meshes.html
  5. 167
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/effects_overview.html
  6. 8
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/loading_screen.html
  7. 16
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html
  8. 9
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/mesh.html
  9. 23
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/multithreading.html
  10. 50
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/networking.html
  11. 4
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/post-processor_water.html
  12. 10
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/save_and_load.html
  13. 7
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/shape.html
  14. 38
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/spatial.html
  15. 36
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/terrain.html
  16. 10
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/android.html
  17. 24
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_audio.html
  18. 15
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_input_system.html
  19. 71
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_node.html
  20. 26
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_terrain.html
  21. 2
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender.html
  22. 134
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/faq.html
  23. 42
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/best_practices.html
  24. 16
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/how_to_use_materials.html
  25. 31
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/math.html
  26. 53
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/multi-media_asset_pipeline.html
  27. 159
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/math.html
  28. 10
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/the_scene_graph.html
  29. 2
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/development/extension_library.html

@ -236,22 +236,18 @@ Definition:
} }
} }
   
// Note that update is only called while the state is both attached and enabled.
@Override @Override
public void update(float tpf) { public void update(float tpf) {
if(isEnabled()){ // do the following while game is RUNNING
// do the following while game is RUNNING this.app.getRootNode().getChild("blah").scale(tpf); // modify scene graph...
this.app.getRootNode().getChild("blah").scale(tpf); // modify scene graph... x.setUserData(...); // call some methods...
x.setUserData(...); // call some methods...
} else {
// do the following while game is PAUSED, e.g. play an idle animation.
...
}
} }
   
&#125;</pre> &#125;</pre>
</div> </div>
<!-- EDIT9 SECTION "AbstractAppState" [6857-9095] --> <!-- EDIT9 SECTION "AbstractAppState" [6857-9029] -->
<h2><a>Pausing and Unpausing</a></h2> <h2><a>Pausing and Unpausing</a></h2>
<div> <div>
@ -261,7 +257,7 @@ You define what an AppState does when Paused or Unpaused, in the <code>setEnable
</p> </p>
</div> </div>
<!-- EDIT10 SECTION "Pausing and Unpausing" [9096-9386] --> <!-- EDIT10 SECTION "Pausing and Unpausing" [9030-9320] -->
<h2><a>AppStateManager</a></h2> <h2><a>AppStateManager</a></h2>
<div> <div>
@ -281,19 +277,19 @@ The com.jme3.app.state.AppStateManager holds the list of AppStates for an applic
<td>getState(MyAppState.class)</td><td>Returns the first attached state that is an instance of a subclass of <code>MyAppState.class</code>.</td> <td>getState(MyAppState.class)</td><td>Returns the first attached state that is an instance of a subclass of <code>MyAppState.class</code>.</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT12 TABLE [9796-10006] --> <!-- EDIT12 TABLE [9730-9940] -->
<p> <p>
The AppStateManager&#039;s <code>render(), postRender(), cleanUp()</code> methods are internal, ignore them, users never call them directly. The AppStateManager&#039;s <code>render(), postRender(), cleanUp()</code> methods are internal, ignore them, users never call them directly.
</p> </p>
</div> </div>
<!-- EDIT11 SECTION "AppStateManager" [9387-10135] --> <!-- EDIT11 SECTION "AppStateManager" [9321-10069] -->
<h2><a>Best Practices</a></h2> <h2><a>Best Practices</a></h2>
<div> <div>
</div> </div>
<!-- EDIT13 SECTION "Best Practices" [10136-10163] --> <!-- EDIT13 SECTION "Best Practices" [10070-10097] -->
<h3><a>Communication Among AppStates</a></h3> <h3><a>Communication Among AppStates</a></h3>
<div> <div>
@ -309,7 +305,7 @@ You can use custom accessors to get data from AppStates, to set data in AppState
<pre>this.app.getStateManager&#40;&#41;.getState&#40;MyAppState.class&#41;.doSomeCustomStuffInThisState&#40;&#41;;</pre> <pre>this.app.getStateManager&#40;&#41;.getState&#40;MyAppState.class&#41;.doSomeCustomStuffInThisState&#40;&#41;;</pre>
</div> </div>
<!-- EDIT14 SECTION "Communication Among AppStates" [10164-10919] --> <!-- EDIT14 SECTION "Communication Among AppStates" [10098-10853] -->
<h3><a>Initialize Familiar Class Fields</a></h3> <h3><a>Initialize Familiar Class Fields</a></h3>
<div> <div>
@ -337,5 +333,5 @@ public void initialize&#40;AppStateManager stateManager, Application app&#41; &#
&#125;</pre> &#125;</pre>
</div> </div>
<!-- EDIT15 SECTION "Initialize Familiar Class Fields" [10920-] --> <!-- EDIT15 SECTION "Initialize Familiar Class Fields" [10854-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:application_states?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:application_states?do=export_xhtmlbody">view online version</a></em></p>

@ -72,12 +72,12 @@ A CollisionResult object contains information about the second party of the coll
<td>getTriangle(t)</td><td>Binds t to the triangle t on the second party&#039;s mesh that was hit.</td> <td>getTriangle(t)</td><td>Binds t to the triangle t on the second party&#039;s mesh that was hit.</td>
</tr> </tr>
<tr> <tr>
<td>getTriangleIndex()</td><td>Returns the index of the triangle on the second party&#039;s mesh that was hit. (?)</td> <td>getTriangleIndex()</td><td>Returns the index of the triangle on the second party&#039;s mesh that was hit.</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT4 TABLE [2503-3040] --> <!-- EDIT4 TABLE [2503-3036] -->
</div> </div>
<!-- EDIT2 SECTION "Collidable" [1439-3041] --> <!-- EDIT2 SECTION "Collidable" [1439-3037] -->
<h3><a>Code Sample</a></h3> <h3><a>Code Sample</a></h3>
<div> <div>
@ -132,13 +132,17 @@ Knowing the distance of the collisions is useful for example when you intersect
</p> </p>
</div> </div>
<!-- EDIT5 SECTION "Code Sample" [3042-5359] --> <!-- EDIT5 SECTION "Code Sample" [3038-5355] -->
<h2><a>Bounding Volumes</a></h2> <h2><a>Bounding Volumes</a></h2>
<div> <div>
<p> <p>
A com.jme3.bounding.BoundingVolume is an interface for dealing with containment of a collection of points. All BoundingVolumes are <code>Collidable</code> and are used as optimization to calculate non-physical collisions more quickly: It&#039;s always faster to calculate an intersection between simple shapes like spheres and boxes than between complex shapes like models. A <code>com.jme3.bounding.BoundingVolume</code> is an interface for dealing with containment of a collection of points. All BoundingVolumes are <code>Collidable</code> and are used as optimization to calculate non-physical collisions more quickly: It&#039;s always faster to calculate an intersection between simple shapes like spheres and boxes than between complex shapes like models.
</p>
<p>
jME3 computes bounding volumes for all objects. These bounding volumes are later used for frustum culling, which is making sure only objects visible on-screen are actually sent for rendering.
</p> </p>
<p> <p>
@ -150,24 +154,25 @@ Supported types:
<img src="/wiki/lib/exe/fetch.php"> <img src="/wiki/lib/exe/fetch.php">
</p> </p>
<ul> <ul>
<li><div> Type.Sphere: com.jme3.bounding.BoundingSphere is a sphere used as a container for a group of vertices of a piece of geometry. A BoundingSphere has a center and a radius.</div> <li><div> Type.AABB = Axis-aligned bounding box, that means it doesn&#039;t rotate, which makes it less precise. A <code>com.jme3.bounding.BoundingBox</code> is an axis-aligned cuboid used as a container for a group of vertices of a piece of geometry. A BoundingBox has a center and extents from that center along the x, y and z axis. This is the default bounding volume, since it is fairly fast to generate and gives better accuracy than the bounding sphere.</div>
</li> </li>
<li><div> Type.AABB = Axis-aligned bounding box, that means it doesn&#039;t rotatewhich makes it less precise. A com.jme3.bounding.BoundingBox is an axis-aligned cuboid used as a container for a group of vertices of a piece of geometry. A BoundingBox has a center and extents from that center along the x, y and z axis.</div> <li><div> Type.Sphere: <code>com.jme3.bounding.BoundingSphere</code> is a sphere used as a container for a group of vertices of a piece of geometry. A BoundingSphere has a center and a radius.</div>
</li> </li>
<li><div> Type.OBB = Oriented bounding box. This bounding box is more precise because it can rotate with its content, but is computationally more expensive. (Currently not supported.)</div> <li><div> Type.OBB = Oriented bounding box. This bounding box is more precise because it can rotate with its content, but is computationally more expensive. (Currently not supported.)</div>
</li> </li>
<li><div> Type.Capsule = Cylinder with rounded ends, also called &quot;swept sphere&quot;. Typically used for mobile characters.</div> <li><div> Type.Capsule = Cylinder with rounded ends, also called &quot;swept sphere&quot;. Typically used for mobile characters. (Currently not supported.)</div>
</li> </li>
</ul> </ul>
<p> <p>
<p><div>Note: If you are looking for BoundingVolumes for physical objects, use <a href="/com/jme3/gde/core/docs/jme3/advanced/physics.html">CollisionShapes</a>. <p><div>Note: If you are looking for bounding volumes for physical objects, use <a href="/com/jme3/gde/core/docs/jme3/advanced/physics.html">CollisionShapes</a>.
</div></p> </div></p>
</p> </p>
</div> </div>
<!-- EDIT6 SECTION "Bounding Volumes" [5360-7041] --> <!-- EDIT6 SECTION "Bounding Volumes" [5356-7399] -->
<h3><a>Usage</a></h3> <h3><a>Usage</a></h3>
<div> <div>
@ -180,13 +185,23 @@ For example you can use Bounding Volumes on custom meshes, or complex non-physic
mesh.updateBound&#40;&#41;;</pre> mesh.updateBound&#40;&#41;;</pre>
</div> </div>
<!-- EDIT7 SECTION "Usage" [7042-7223] --> <!-- EDIT7 SECTION "Usage" [7400-7581] -->
<h2><a>Mesh and Scene Graph Collision</a></h2>
<div>
<p>
One of the supported <code>Collidable</code>s are meshes and scene graph objects. To execute a collision detection query against a scene graph, use <code>Spatial.collideWith()</code>. This will traverse the scene graph and return any mesh collisions that were detected. Note that the first collision against a particular scene graph may take a long time, this is because a special data structure called <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://en.wikipedia.org/wiki/Bounding_interval_hierarchy"><param name="text" value="<html><u>|Bounding Interval Hierarchy (BIH)</u></html>"><param name="textColor" value="blue"></object> needs to be generated for the meshes. At a later point, the mesh could change and the BIH tree would become out of date, in that case, call <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://jmonkeyengine.org/javadoc/com/jme3/scene/Mesh.html#createCollisionData()"><param name="text" value="<html><u>Mesh.createCollisionData()</u></html>"><param name="textColor" value="blue"></object> on the changed mesh to update the BIH tree.
</p>
</div>
<!-- EDIT8 SECTION "Mesh and Scene Graph Collision" [7582-8402] -->
<h2><a>Intersection</a></h2> <h2><a>Intersection</a></h2>
<div> <div>
<p> <p>
A com.jme3.math.Ray is an infinite line with a beginning, a direction, and no end; whereas a com.jme3.math.Line is an infinite line with only a direction (no beginning, no end). A <code>com.jme3.math.Ray</code> is an infinite line with a beginning, a direction, and no end; whereas a <code>com.jme3.math.Line</code> is an infinite line with only a direction (no beginning, no end).
</p> </p>
<p> <p>
@ -214,14 +229,12 @@ Learn the details of how to implement <a href="/com/jme3/gde/core/docs/jme3/adva
TODO: TODO:
</p> </p>
<ul> <ul>
<li><div> Bounding Interval Hierarchy com.jme3.collision.bih.BIHNode</div> <li><div> Bounding Interval Hierarchy (<code>com.jme3.collision.bih.BIHNode</code>)</div>
</li> </li>
<li><div> com.jme3.scene.CollisionData</div> <li><div> com.jme3.scene.CollisionData</div>
</li> </li>
<li><div> A com.jme3.collision.SweepSphere implements a collidable &quot;stretched&quot; sphere that is shaped like a capsule (an upright cylinder with half a sphere on top and the second half at the bottom). This shape is usually used to simulate simple non-physcial collisions for character entities in games. The sweep sphere can be used to check collision against a triangle or another sweep sphere.</div>
</li>
</ul> </ul>
</div> </div>
<!-- EDIT8 SECTION "Intersection" [7224-] --> <!-- EDIT9 SECTION "Intersection" [8403-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:collision_and_intersection?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:collision_and_intersection?do=export_xhtmlbody">view online version</a></em></p>

@ -145,7 +145,7 @@ For example, you disable your IdleBehaviourControl when you enable your Defensiv
Usage: Your custom subclass implements the three methods <code>controlUpdate()</code>, <code>controlRender()</code>, <code>setSpatial()</code>, and <code>cloneForSpatial()</code> as shown here: Usage: Your custom subclass implements the three methods <code>controlUpdate()</code>, <code>controlRender()</code>, <code>setSpatial()</code>, and <code>cloneForSpatial()</code> as shown here:
</p> </p>
<pre>public class MyControl extends AbstractControl implements Savable, Cloneable &#123; <pre>public class MyControl extends AbstractControl implements Savable, Cloneable &#123;
privat int index; // can have custom fields -- example private int index; // can have custom fields -- example
&nbsp; &nbsp;
public MyControl&#40;&#41;&#123;&#125; // empty serialization constructor public MyControl&#40;&#41;&#123;&#125; // empty serialization constructor
&nbsp; &nbsp;
@ -214,7 +214,7 @@ See also:
</ul> </ul>
</div> </div>
<!-- EDIT4 SECTION "AbstractControl Class" [4501-7446] --> <!-- EDIT4 SECTION "AbstractControl Class" [4501-7447] -->
<h2><a>The Control Interface</a></h2> <h2><a>The Control Interface</a></h2>
<div> <div>
@ -321,7 +321,7 @@ Usage example:
&#125;</pre> &#125;</pre>
</div> </div>
<!-- EDIT5 SECTION "The Control Interface" [7447-10698] --> <!-- EDIT5 SECTION "The Control Interface" [7448-10699] -->
<h2><a>Best Practices</a></h2> <h2><a>Best Practices</a></h2>
<div> <div>
@ -387,5 +387,5 @@ vehicleSpatial.addControl&#40;new ManualVehicleControl&#40;&#41;&#41;;
c.steerX&#40;steerX&#41;;</pre> c.steerX&#40;steerX&#41;;</pre>
</div> </div>
<!-- EDIT6 SECTION "Best Practices" [10699-] --> <!-- EDIT6 SECTION "Best Practices" [10700-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:custom_controls?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:custom_controls?do=export_xhtmlbody">view online version</a></em></p>

@ -154,6 +154,15 @@ Ta-daa!
</div> </div>
<!-- EDIT8 SECTION "Using the Mesh in a Scene" [4321-4740] --> <!-- EDIT8 SECTION "Using the Mesh in a Scene" [4321-4740] -->
<h2><a>Dynamic Meshes</a></h2>
<div>
<p>
If modifying a mesh dynamically in a way which would change the model&#039;s bounds then you need to call updateModelBound() on the Geometry object containing the mesh after calling updateBounds() on the mesh object. There is a warning on updateModelBounds about not usually needing to use it but that can be ignored in this special case.
</p>
</div>
<!-- EDIT9 SECTION "Dynamic Meshes" [4741-5102] -->
<h2><a>Optional Mesh Features</a></h2> <h2><a>Optional Mesh Features</a></h2>
<div> <div>
@ -163,7 +172,7 @@ There are more vertex buffers in a Mesh than the three shown above. For an overv
</p> </p>
</div> </div>
<!-- EDIT9 SECTION "Optional Mesh Features" [4741-4879] --> <!-- EDIT10 SECTION "Optional Mesh Features" [5103-5241] -->
<h3><a>Example: Vertex Colors</a></h3> <h3><a>Example: Vertex Colors</a></h3>
<div> <div>
@ -229,7 +238,7 @@ Now you see a gradient color extending from each vertex.
</p> </p>
</div> </div>
<!-- EDIT10 SECTION "Example: Vertex Colors" [4880-7029] --> <!-- EDIT11 SECTION "Example: Vertex Colors" [5242-7391] -->
<h3><a>Example: Shaded Mesh with Normals</a></h3> <h3><a>Example: Shaded Mesh with Normals</a></h3>
<div> <div>
@ -247,7 +256,7 @@ You need as many normals as the polygon has vertices. For a flat quad, they poin
</p> </p>
</div> </div>
<!-- EDIT11 SECTION "Example: Shaded Mesh with Normals" [7030-7801] --> <!-- EDIT12 SECTION "Example: Shaded Mesh with Normals" [7392-8163] -->
<h3><a>Example: Point Mode</a></h3> <h3><a>Example: Point Mode</a></h3>
<div> <div>
@ -273,7 +282,7 @@ This will result in a 10 px dot being rendered for each of the four vertices. Th
</p> </p>
</div> </div>
<!-- EDIT12 SECTION "Example: Point Mode" [7802-8456] --> <!-- EDIT13 SECTION "Example: Point Mode" [8164-8818] -->
<h2><a>Tip: Front and Back Faces</a></h2> <h2><a>Tip: Front and Back Faces</a></h2>
<div> <div>
@ -290,7 +299,14 @@ In case that your use case requires the backfaces to be visible, you have two op
<code>int[] indexes = { 2,0,1, 1,3,2, 2,3,1, 1,0,2 }; </code></div> <code>int[] indexes = { 2,0,1, 1,3,2, 2,3,1, 1,0,2 }; </code></div>
</li> </li>
</ul> </ul>
<div><span>
<a href="/wiki/doku.php/tag:spatial?do=showtag&amp;tag=tag%3Aspatial">spatial</a>,
<a href="/wiki/doku.php/tag:node?do=showtag&amp;tag=tag%3Anode">node</a>,
<a href="/wiki/doku.php/tag:mesh?do=showtag&amp;tag=tag%3Amesh">mesh</a>,
<a href="/wiki/doku.php/tag:geometry?do=showtag&amp;tag=tag%3Ageometry">geometry</a>,
<a href="/wiki/doku.php/tag:scenegraph?do=showtag&amp;tag=tag%3Ascenegraph">scenegraph</a>
</span></div>
</div> </div>
<!-- EDIT13 SECTION "Tip: Front and Back Faces" [8457-] --> <!-- EDIT14 SECTION "Tip: Front and Back Faces" [8819-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:custom_meshes?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:custom_meshes?do=export_xhtmlbody">view online version</a></em></p>

@ -1,46 +1,89 @@
<h1><a>jME3 Post-Processor Filters and Effects -- Overview</a></h1> <h1><a>jME3 Special Effects Overview</a></h1>
<div> <div>
<p> <p>
jME3 supports two types of effects, post-rendering filters and particle emitters. This list contains screenshots and links to sample code that demonstrates how to add the effect to a scene. jME3 supports several types of special effects: Post-Processor Filters, SceneProcessors, and Particle Emitters (also known as particle systems). This list contains screenshots and links to sample code that demonstrates how to add the effect to a scene.
</p> </p>
<p> </div>
For example, post-processor filter effects are typically activated after the following pattern: <!-- EDIT1 SECTION "jME3 Special Effects Overview" [1-299] -->
</p> <h2><a>Sample Code</a></h2>
<div>
<ul>
<li><div> There is one <code>com.jme3.effect.ParticleEmitter</code> class for all Particle Systems. </div>
</li>
<li><div> There is one <code>com.jme3.post.FilterPostProcessor</code> class and several <code>com.jme3.post.filters.*</code> classes (all Filters have <code>*Filter</code> in their names). </div>
</li>
<li><div> There are several <code>SceneProcessor</code> classes in various packages, including e.g. <code>com.jme3.shadow.*</code> and <code>com.jme3.water.*</code> (SceneProcessor have <code>*Processor</code> or <code>*Renderer</code> in their names).</div>
</li>
</ul>
</div>
<!-- EDIT2 SECTION "Sample Code" [300-768] -->
<h3><a>Particle Emitter</a></h3>
<div>
<pre>public class MyGame extends SimpleApplication &#123; <pre>public class MyGame extends SimpleApplication &#123;
private FilterPostProcessor fpp; public void simpleInitApp&#40;&#41; &#123;
private SomeFilter sf; ParticleEmitter pm = new ParticleEmitter&#40;&quot;my particle effect&quot;, Type.Triangle, 60&#41;;
Material pmMat = new Material&#40;assetManager, &quot;Common/MatDefs/Misc/Particle.j3md&quot;&#41;;
pmMat.setTexture&#40;&quot;Texture&quot;, assetManager.loadTexture&#40;&quot;Effects/spark.png&quot;&#41;&#41;;
pm.setMaterial&#40;pmMat&#41;;
pm.setImagesX&#40;1&#41;;
pm.setImagesY&#40;1&#41;;
rootNode.attachChild&#40;pm&#41;; // attach one or more emitters to any node
&#125;
&#125;</pre>
</div>
<!-- EDIT3 SECTION "Particle Emitter" [769-1298] -->
<h3><a>Scene Processor</a></h3>
<div>
<pre>public class MyGame extends SimpleApplication &#123;
private BasicShadowRenderer bsr;
&nbsp;
public void simpleInitApp&#40;&#41; &#123;
bsr = new BasicShadowRenderer&#40;assetManager, 1024&#41;;
bsr.setDirection&#40;new Vector3f&#40;.3f, -0.5f, -0.5f&#41;&#41;;
viewPort.addProcessor&#40;bsr&#41;; // add one or more sceneprocessor to viewport
&#125;</pre>
</div>
<!-- EDIT4 SECTION "Scene Processor" [1299-1674] -->
<h3><a>Post-Processor Filter</a></h3>
<div>
<pre>public class MyGame extends SimpleApplication &#123;
private FilterPostProcessor fpp; // one FilterPostProcessor per app
private SomeFilter sf; // one or more Filters per app
&nbsp; &nbsp;
public void simpleInitApp&#40;&#41; &#123; public void simpleInitApp&#40;&#41; &#123;
...
fpp = new FilterPostProcessor&#40;assetManager&#41;; fpp = new FilterPostProcessor&#40;assetManager&#41;;
viewPort.addProcessor&#40;fpp&#41;; // add one FilterPostProcessor to viewPort
&nbsp;
sf = new SomeFilter&#40;&#41;; sf = new SomeFilter&#40;&#41;;
fpp.addFilter&#40;sf&#41;; fpp.addFilter&#40;sf&#41;; // add one or more Filters to FilterPostProcessor
viewPort.addProcessor&#40;fpp&#41;;
...
&#125;</pre> &#125;</pre>
</div> </div>
<!-- EDIT1 SECTION "jME3 Post-Processor Filters and Effects -- Overview" [1-704] --> <!-- EDIT5 SECTION "Post-Processor Filter" [1675-2201] -->
<h2><a>Water</a></h2> <h2><a>Water</a></h2>
<div> <div>
<p> <p>
<img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/water-post.png"><img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/water.png"> <img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/water-post.png"><img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/water.png">
The jMonkeyEngine features <a href="/com/jme3/gde/core/docs/jme3/advanced/water.html">&quot;SeaMonkey&quot; water effect</a> including cool underwater caustics. The jMonkeyEngine&#039;s <a href="/com/jme3/gde/core/docs/jme3/advanced/water.html">&quot;SeaMonkey&quot; WaterFilter</a> simulates ocean waves, foam, including cool underwater caustics.
Use the SimpleWaterProcessor (SceneProcessor) for small, limited bodies of water, such as puddles, drinking troughs, pools, fountains.
</p> </p>
<p> <p>
See also the <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://jmonkeyengine.org/2011/01/15/new-advanced-water-effect-for-jmonkeyengine-3"><param name="text" value="<html><u>Rendering Water as Post-Process Effect</u></html>"><param name="textColor" value="blue"></object> announcement with video. See also the <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://jmonkeyengine.org/2011/01/15/new-advanced-water-effect-for-jmonkeyengine-3"><param name="text" value="<html><u>Rendering Water as Post-Process Effect</u></html>"><param name="textColor" value="blue"></object> announcement with video.
</p> </p>
<ul> <ul>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/water/TestSceneWater.java"><param name="text" value="<html><u>jme3/src/test/jme3test/water/TestSceneWater.java</u></html>"><param name="textColor" value="blue"></object></div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/water/TestSceneWater.java"><param name="text" value="<html><u>jme3/src/test/jme3test/water/TestSceneWater.java</u></html>"><param name="textColor" value="blue"></object> – SimpleWaterProcessor (SceneProcessor)</div>
</li> </li>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/water/TestSimpleWater.java"><param name="text" value="<html><u>jme3/src/test/jme3test/water/TestSimpleWater.java</u></html>"><param name="textColor" value="blue"></object></div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/water/TestSimpleWater.java"><param name="text" value="<html><u>jme3/src/test/jme3test/water/TestSimpleWater.java</u></html>"><param name="textColor" value="blue"></object> – SimpleWaterProcessor (SceneProcessor)</div>
</li> </li>
</ul> </ul>
@ -48,19 +91,19 @@ See also the <object classid="java:org.netbeans.modules.javahelp.BrowserDisplaye
<img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/water-reflection-muddy.png"><img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/underwater2.jpg"> <img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/water-reflection-muddy.png"><img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/underwater2.jpg">
</p> </p>
<ul> <ul>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/water/TestPostWater.java"><param name="text" value="<html><u>jme3/src/test/jme3test/water/TestPostWater.java</u></html>"><param name="textColor" value="blue"></object></div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/water/TestPostWater.java"><param name="text" value="<html><u>jme3/src/test/jme3test/water/TestPostWater.java</u></html>"><param name="textColor" value="blue"></object> – WaterFilter</div>
</li> </li>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/water/TestPostWaterLake.java"><param name="text" value="<html><u>jme3/src/test/jme3test/water/TestPostWaterLake.java</u></html>"><param name="textColor" value="blue"></object></div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/water/TestPostWaterLake.java"><param name="text" value="<html><u>jme3/src/test/jme3test/water/TestPostWaterLake.java</u></html>"><param name="textColor" value="blue"></object> – WaterFilter</div>
</li> </li>
</ul> </ul>
</div> </div>
<!-- EDIT2 SECTION "Water" [705-1855] --> <!-- EDIT6 SECTION "Water" [2202-3620] -->
<h2><a>Environment Effects</a></h2> <h2><a>Environment Effects</a></h2>
<div> <div>
</div> </div>
<!-- EDIT3 SECTION "Environment Effects" [1856-1888] --> <!-- EDIT7 SECTION "Environment Effects" [3621-3653] -->
<h3><a>Depth of Field Blur</a></h3> <h3><a>Depth of Field Blur</a></h3>
<div> <div>
@ -69,30 +112,30 @@ See also the <object classid="java:org.netbeans.modules.javahelp.BrowserDisplaye
<img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/dof-blur.png"><img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/light-scattering-filter.png"> <img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/dof-blur.png"><img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/light-scattering-filter.png">
</p> </p>
<ul> <ul>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestDepthOfField.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestDepthOfField.java</u></html>"><param name="textColor" value="blue"></object></div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestDepthOfField.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestDepthOfField.java</u></html>"><param name="textColor" value="blue"></object> – DepthOfFieldFilter</div>
</li> </li>
</ul> </ul>
</div> </div>
<!-- EDIT4 SECTION "Depth of Field Blur" [1889-2185] --> <!-- EDIT8 SECTION "Depth of Field Blur" [3654-3972] -->
<h3><a>Fog</a></h3> <h3><a>Fog</a></h3>
<div> <div>
<ul> <ul>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestFog.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestFog.java</u></html>"><param name="textColor" value="blue"></object></div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestFog.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestFog.java</u></html>"><param name="textColor" value="blue"></object> – FogFilter</div>
</li> </li>
</ul> </ul>
</div> </div>
<!-- EDIT5 SECTION "Fog" [2186-2352] --> <!-- EDIT9 SECTION "Fog" [3973-4152] -->
<h3><a>Light Scattering</a></h3> <h3><a>Light Scattering</a></h3>
<div> <div>
<ul> <ul>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestLightScattering.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestLightScattering.java</u></html>"><param name="textColor" value="blue"></object></div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestLightScattering.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestLightScattering.java</u></html>"><param name="textColor" value="blue"></object> – LightScatteringFilter</div>
</li> </li>
</ul> </ul>
</div> </div>
<!-- EDIT6 SECTION "Light Scattering" [2353-2556] --> <!-- EDIT10 SECTION "Light Scattering" [4153-4381] -->
<h3><a>Vegetation</a></h3> <h3><a>Vegetation</a></h3>
<div> <div>
<ul> <ul>
@ -103,7 +146,7 @@ See also the <object classid="java:org.netbeans.modules.javahelp.BrowserDisplaye
</ul> </ul>
</div> </div>
<!-- EDIT7 SECTION "Vegetation" [2557-2794] --> <!-- EDIT11 SECTION "Vegetation" [4382-4619] -->
<h2><a>Light and Shadows</a></h2> <h2><a>Light and Shadows</a></h2>
<div> <div>
@ -112,26 +155,26 @@ See also the <object classid="java:org.netbeans.modules.javahelp.BrowserDisplaye
</p> </p>
</div> </div>
<!-- EDIT8 SECTION "Light and Shadows" [2795-2918] --> <!-- EDIT12 SECTION "Light and Shadows" [4620-4743] -->
<h3><a>Bloom and Glow</a></h3> <h3><a>Bloom and Glow</a></h3>
<div> <div>
<ul> <ul>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestBloom.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestBloom.java</u></html>"><param name="textColor" value="blue"></object></div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestBloom.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestBloom.java</u></html>"><param name="textColor" value="blue"></object></div>
</li> </li>
<li><div> More details: <a href="/com/jme3/gde/core/docs/jme3/advanced/bloom_and_glow.html">Bloom and Glow</a></div> <li><div> More details: <a href="/com/jme3/gde/core/docs/jme3/advanced/bloom_and_glow.html">Bloom and Glow</a> – BloomFilter</div>
</li> </li>
</ul> </ul>
</div> </div>
<!-- EDIT9 SECTION "Bloom and Glow" [2919-3150] --> <!-- EDIT13 SECTION "Bloom and Glow" [4744-4990] -->
<h3><a>Light</a></h3> <h3><a>Light</a></h3>
<div> <div>
<ul> <ul>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/light/TestSimpleLighting.java"><param name="text" value="<html><u>jme3/src/test/jme3test/light/TestSimpleLighting.java</u></html>"><param name="textColor" value="blue"></object></div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/light/TestSimpleLighting.java"><param name="text" value="<html><u>jme3/src/test/jme3test/light/TestSimpleLighting.java</u></html>"><param name="textColor" value="blue"></object> – DirectionalLight, PointLight</div>
</li> </li>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/light/TestLightRadius.java"><param name="text" value="<html><u>jme3/src/test/jme3test/light/TestLightRadius.java</u></html>"><param name="textColor" value="blue"></object></div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/light/TestLightRadius.java"><param name="text" value="<html><u>jme3/src/test/jme3test/light/TestLightRadius.java</u></html>"><param name="textColor" value="blue"></object> – DirectionalLight, PointLight</div>
</li> </li>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/light/TestManyLights.java"><param name="text" value="<html><u>jme3/src/test/jme3test/light/TestManyLights.java</u></html>"><param name="textColor" value="blue"></object></div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/light/TestManyLights.java"><param name="text" value="<html><u>jme3/src/test/jme3test/light/TestManyLights.java</u></html>"><param name="textColor" value="blue"></object> – .j3o scene</div>
</li> </li>
<li><div> More details: <a href="/com/jme3/gde/core/docs/jme3/advanced/light_and_shadow.html">Light and Shadow</a></div> <li><div> More details: <a href="/com/jme3/gde/core/docs/jme3/advanced/light_and_shadow.html">Light and Shadow</a></div>
</li> </li>
@ -143,24 +186,24 @@ See also the <object classid="java:org.netbeans.modules.javahelp.BrowserDisplaye
</p> </p>
</div> </div>
<!-- EDIT10 SECTION "Light" [3151-3817] --> <!-- EDIT14 SECTION "Light" [4991-5735] -->
<h3><a>Shadow</a></h3> <h3><a>Shadow</a></h3>
<div> <div>
<ul> <ul>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/light/TestShadow.java"><param name="text" value="<html><u>jme3/src/test/jme3test/light/TestShadow.java</u></html>"><param name="textColor" value="blue"></object>Simple Shadows</div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/light/TestShadow.java"><param name="text" value="<html><u>jme3/src/test/jme3test/light/TestShadow.java</u></html>"><param name="textColor" value="blue"></object>BasicShadowRenderer (SceneProcessor)</div>
</li> </li>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/light/TestPssmShadow.java"><param name="text" value="<html><u>jme3/src/test/jme3test/light/TestPssmShadow.java</u></html>"><param name="textColor" value="blue"></object> – Parallel-Split Shadow Mapping (PSSM)</div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/light/TestPssmShadow.java"><param name="text" value="<html><u>jme3/src/test/jme3test/light/TestPssmShadow.java</u></html>"><param name="textColor" value="blue"></object> – PssmShadowRenderer (SceneProcessor), also known as Parallel-Split Shadow Mapping (PSSM).</div>
</li> </li>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestSSAO.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestSSAO.java</u></html>"><param name="textColor" value="blue"></object>, <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestSSAO2.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestSSAO2.java</u></html>"><param name="textColor" value="blue"></object> – Screen-Space Ambient Occlusion shadows</div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestSSAO.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestSSAO.java</u></html>"><param name="textColor" value="blue"></object>, <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestSSAO2.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestSSAO2.java</u></html>"><param name="textColor" value="blue"></object> – SSAOFilter, also known as Screen-Space Ambient Occlusion shadows (SSOA).</div>
</li> </li>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestTransparentSSAO.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestTransparentSSAO.java</u></html>"><param name="textColor" value="blue"></object> – Screen-Space Ambient Occlusion shadows plus transparancy</div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestTransparentSSAO.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestTransparentSSAO.java</u></html>"><param name="textColor" value="blue"></object> – SSAOFilter, also known as Screen-Space Ambient Occlusion shadows (SSOA), plus transparancy</div>
</li> </li>
<li><div> More details: <a href="/com/jme3/gde/core/docs/jme3/advanced/light_and_shadow.html">Light and Shadow</a></div> <li><div> More details: <a href="/com/jme3/gde/core/docs/jme3/advanced/light_and_shadow.html">Light and Shadow</a></div>
</li> </li>
</ul> </ul>
</div> </div>
<!-- EDIT11 SECTION "Shadow" [3818-4857] --> <!-- EDIT15 SECTION "Shadow" [5736-6917] -->
<h2><a>Special: Glass, Metal, Dissolve, Toon</a></h2> <h2><a>Special: Glass, Metal, Dissolve, Toon</a></h2>
<div> <div>
@ -171,27 +214,27 @@ See also the <object classid="java:org.netbeans.modules.javahelp.BrowserDisplaye
</p> </p>
</div> </div>
<!-- EDIT12 SECTION "Special: Glass, Metal, Dissolve, Toon" [4858-4950] --> <!-- EDIT16 SECTION "Special: Glass, Metal, Dissolve, Toon" [6918-7010] -->
<h3><a>Toon Effect</a></h3> <h3><a>Toon Effect</a></h3>
<div> <div>
<ul> <ul>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestCartoonEdge.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestCartoonEdge.java</u></html>"><param name="textColor" value="blue"></object></div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestCartoonEdge.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestCartoonEdge.java</u></html>"><param name="textColor" value="blue"></object> – CartoonEdgeFilter</div>
</li> </li>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestTransparentCartoonEdge.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestTransparentCartoonEdge.java</u></html>"><param name="textColor" value="blue"></object></div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestTransparentCartoonEdge.java"><param name="text" value="<html><u>jme3/src/test/jme3test/post/TestTransparentCartoonEdge.java</u></html>"><param name="textColor" value="blue"></object> – CartoonEdgeFilter</div>
</li> </li>
</ul> </ul>
</div> </div>
<!-- EDIT13 SECTION "Toon Effect" [4951-5329] --> <!-- EDIT17 SECTION "Toon Effect" [7011-7431] -->
<h3><a>Fade in / Fade out</a></h3> <h3><a>Fade in / Fade out</a></h3>
<div> <div>
<ul> <ul>
<li><div> <a href="/com/jme3/gde/core/docs/jme3/advanced/fade.html">Fade</a></div> <li><div> <a href="/com/jme3/gde/core/docs/jme3/advanced/fade.html">Fade</a> – FadeFilter</div>
</li> </li>
</ul> </ul>
</div> </div>
<!-- EDIT14 SECTION "Fade in / Fade out" [5330-5387] --> <!-- EDIT18 SECTION "Fade in / Fade out" [7432-7503] -->
<h3><a>User Contributed</a></h3> <h3><a>User Contributed</a></h3>
<div> <div>
@ -204,19 +247,29 @@ See also the <object classid="java:org.netbeans.modules.javahelp.BrowserDisplaye
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jme-glsl-shaders/"><param name="text" value="<html><u>User Contributed GLSL Shader Library</u></html>"><param name="textColor" value="blue"></object> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jme-glsl-shaders/"><param name="text" value="<html><u>User Contributed GLSL Shader Library</u></html>"><param name="textColor" value="blue"></object>
</p> </p>
<ul> <ul>
<li><div> LightBlow Shader</div> <li><div> LightBlow Shader – blend material texture maps</div>
</li>
<li><div> FakeParticleBlow Shader – jet, fire effect</div>
</li>
<li><div> ToonBlow Shader – Toon Shading, toon edges </div>
</li>
<li><div> Dissolve Shader – Scifi teleportation/dissolve effect</div>
</li>
<li><div> MatCap Shader – Gold, metals, glass, toons…!</div>
</li>
<li><div> Glass Shader – Glass</div>
</li> </li>
<li><div> FakeParticleBlow Shader</div> <li><div> Force Shield Shader – Scifi impact-on-force-field effect</div>
</li> </li>
<li><div> ToonBlow Shader</div> <li><div> SimpleSprite Shader – Animated textures</div>
</li> </li>
<li><div> Dissolve Shader</div> <li><div> SimpleSpriteParticle Shader – Sprite library</div>
</li> </li>
<li><div> MatCap Shader for glass, gold, metals, toons…</div> <li><div> MovingTexture Shader – Animated cloud/mist texture</div>
</li> </li>
<li><div> Glass Shader</div> <li><div> SoftParticles Shader – Fire, clouds, smoke etc</div>
</li> </li>
<li><div> Force Shield Shader</div> <li><div> Displace Shader – Deformation effect: Ripple, wave, pulse, swell!</div>
</li> </li>
</ul> </ul>
@ -226,21 +279,21 @@ Thanks for your awesome contributions! Keep them coming!
</p> </p>
</div> </div>
<!-- EDIT15 SECTION "User Contributed" [5388-5934] --> <!-- EDIT19 SECTION "User Contributed" [7504-8490] -->
<h2><a>Particles: Explosions, Fire, Smoke</a></h2> <h2><a>Particle Emitters: Explosions, Fire, Smoke</a></h2>
<div> <div>
<p> <p>
<img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/explosion-5.png"><img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/particle.png"> <img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/explosion-5.png"><img src="nbdocs:/com/jme3/gde/core/docs/jme3/advanced/particle.png">
<a href="/com/jme3/gde/core/docs/jme3/advanced/particle_emitters.html">Particle emitter effects</a> can have any texture, e.g. fog, smoke, leaves, meteors, snowflakes, mosquitos, fire, sparks… <a href="/com/jme3/gde/core/docs/jme3/advanced/particle_emitters.html">Particle emitter effects</a> are highly configurable and can have any texture. They can simulate smoke, dust, leaves, meteors, snowflakes, mosquitos, fire, explosions, clusters, embers, sparks…
</p> </p>
<ul> <ul>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/effect/TestExplosionEffect.java"><param name="text" value="<html><u>jme3/src/test/jme3test/effect/TestExplosionEffect.java</u></html>"><param name="textColor" value="blue"></object> – debris, flame, flash, shockwave, smoke, sparks</div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/effect/TestExplosionEffect.java"><param name="text" value="<html><u>jme3/src/test/jme3test/effect/TestExplosionEffect.java</u></html>"><param name="textColor" value="blue"></object> – debris, flame, flash, shockwave, smoke, sparks</div>
</li> </li>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/effect/TestParticleEmitter.java"><param name="text" value="<html><u>jme3/src/test/jme3test/effect/TestParticleEmitter.java</u></html>"><param name="textColor" value="blue"></object></div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/effect/TestPointSprite.java"><param name="text" value="<html><u>jme3/src/test/jme3test/effect/TestPointSprite.java</u></html>"><param name="textColor" value="blue"></object> – cluster of points </div>
</li> </li>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/effect/TestMovingParticle.java"><param name="text" value="<html><u>jme3/src/test/jme3test/effect/TestMovingParticle.java</u></html>"><param name="textColor" value="blue"></object></div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/effect/TestMovingParticle.java"><param name="text" value="<html><u>jme3/src/test/jme3test/effect/TestMovingParticle.java</u></html>"><param name="textColor" value="blue"></object> – dust, smoke</div>
</li> </li>
</ul> </ul>
<hr /> <hr />
@ -264,5 +317,5 @@ See also:
</span></div> </span></div>
</div> </div>
<!-- EDIT16 SECTION "Particles: Explosions, Fire, Smoke" [5935-] --> <!-- EDIT20 SECTION "Particle Emitters: Explosions, Fire, Smoke" [8491-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:effects_overview?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:effects_overview?do=export_xhtmlbody">view online version</a></em></p>

@ -552,6 +552,14 @@ public class TestLoadingScreen1 extends SimpleApplication implements ScreenContr
&nbsp; &nbsp;
public void onFocus&#40;boolean getFocus&#41; &#123; public void onFocus&#40;boolean getFocus&#41; &#123;
&#125; &#125;
&nbsp;
&nbsp;
@Override
public void stop&#40;&#41; &#123;
super.stop&#40;&#41;;
//the pool executor needs to be shut down so the application properly exits.
exec.shutdown&#40;&#41;;
&#125;
&#125;</pre> &#125;</pre>
</div> </div>

@ -340,21 +340,21 @@ Later, put the Geometry (not the Material!) in the appropriate render queue
<th>Material Option</th><th>Usage</th><th>Example</th> <th>Material Option</th><th>Usage</th><th>Example</th>
</tr> </tr>
<tr> <tr>
<td>getAdditionalRenderState().setFaceCullMode(FaceCullMode.Back); </td><td>Activate back-face culling. Mesh faces that are not facing the camera are not rendered, which saves time. Backface culling is activated by default as a major optimization.</td><td>The backside of mesh polygons (and the inside of models) is invisible. </td> <td>getAdditionalRenderState().setFaceCullMode(FaceCullMode.Back); </td><td>Activates back-face culling. Mesh faces that are facing away from the camera are not rendered, which saves time. *Backface culling is activated by default as a major optimization.* </td><td>The invisible backsides and insides of models are not calculated. </td>
</tr> </tr>
<tr> <tr>
<td>getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off); </td><td>Nothing is culled. Both mesh faces are rendered, even if they face away from the camera. Slow.</td><td>Sometimes used to debug custom meshes if you messed up some of the polygon sides, or for special shadow effects.</td> <td>getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off); </td><td>No meshes are culled. Both mesh faces are rendered, even if they face away from the camera. Slow.</td><td>Sometimes used to debug custom meshes if you messed up some of the polygon sides, or for special shadow effects.</td>
</tr> </tr>
<tr> <tr>
<td>getAdditionalRenderState().setFaceCullMode(FaceCullMode.Front); </td><td>Activate front-face culling. Mesh faces facing the camera are not rendered.</td><td>Typically not used because you wouldn&#039;t see anything.</td> <td>getAdditionalRenderState().setFaceCullMode(FaceCullMode.Front); </td><td>Activates front-face culling. Mesh faces facing the camera are not rendered.</td><td>No example – Typically not used because you wouldn&#039;t see anything meaningful.</td>
</tr> </tr>
<tr> <tr>
<td>getAdditionalRenderState().setFaceCullMode(FaceCullMode.FrontAndBack)</td><td>Cull both backfaces and frontfaces.</td><td>Use this as an efficient way to make an object temporarily invisible, while keeping all its other in-game properties (node attachment, collision shapes, interactions, etc) active.</td> <td>getAdditionalRenderState().setFaceCullMode(FaceCullMode.FrontAndBack)</td><td>Culls both backfaces and frontfaces.</td><td>Use this as an efficient way to make an object temporarily invisible, while keeping all its other in-game properties (such as node attachment, collision shapes, interactions, etc) active.</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT15 TABLE [13385-14484] --> <!-- EDIT15 TABLE [13385-14527] -->
</div> </div>
<!-- EDIT14 SECTION "Culling" [13366-14485] --> <!-- EDIT14 SECTION "Culling" [13366-14528] -->
<h3><a>Miscellaneous</a></h3> <h3><a>Miscellaneous</a></h3>
<div> <div>
<div><table> <div><table>
@ -368,7 +368,7 @@ Later, put the Geometry (not the Material!) in the appropriate render queue
<td>getAdditionalRenderState().setPolyOffset();</td><td>Enable polygon offset.</td><td>Use this when you have meshes that have triangles really close to each over (e.g. <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://en.wikipedia.org/wiki/Coplanarity"><param name="text" value="<html><u>Coplanar</u></html>"><param name="textColor" value="blue"></object>), it will shift the depth values to prevent <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://en.wikipedia.org/wiki/Z-fighting"><param name="text" value="<html><u>Z-fighting</u></html>"><param name="textColor" value="blue"></object>.</td> <td>getAdditionalRenderState().setPolyOffset();</td><td>Enable polygon offset.</td><td>Use this when you have meshes that have triangles really close to each over (e.g. <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://en.wikipedia.org/wiki/Coplanarity"><param name="text" value="<html><u>Coplanar</u></html>"><param name="textColor" value="blue"></object>), it will shift the depth values to prevent <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://en.wikipedia.org/wiki/Z-fighting"><param name="text" value="<html><u>Z-fighting</u></html>"><param name="textColor" value="blue"></object>.</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT17 TABLE [14511-15277] --> <!-- EDIT17 TABLE [14554-15320] -->
<p> <p>
<strong>Related Links</strong> <strong>Related Links</strong>
@ -389,7 +389,7 @@ Later, put the Geometry (not the Material!) in the appropriate render queue
</span></div> </span></div>
</div> </div>
<!-- EDIT16 SECTION "Miscellaneous" [14486-] --><div> <!-- EDIT16 SECTION "Miscellaneous" [14529-] --><div>
<div><sup><a href="#fnt__1">1)</a></sup> <div><sup><a href="#fnt__1">1)</a></sup>
UseAlpha specifies whether DiffuseMap uses the alpha channel</div> UseAlpha specifies whether DiffuseMap uses the alpha channel</div>
<div><sup><a href="#fnt__2">2)</a></sup> <div><sup><a href="#fnt__2">2)</a></sup>

@ -158,7 +158,14 @@ The VertexBuffer contains a particular type of geometry data used by Meshes. Eve
<td>Mesh.Mode.Hybrid</td><td>?</td> <td>Mesh.Mode.Hybrid</td><td>?</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT5 TABLE [2667-2908] --> <!-- EDIT5 TABLE [2667-2908] --><div><span>
<a href="/wiki/doku.php/tag:spatial?do=showtag&amp;tag=tag%3Aspatial">spatial</a>,
<a href="/wiki/doku.php/tag:node?do=showtag&amp;tag=tag%3Anode">node</a>,
<a href="/wiki/doku.php/tag:mesh?do=showtag&amp;tag=tag%3Amesh">mesh</a>,
<a href="/wiki/doku.php/tag:geometry?do=showtag&amp;tag=tag%3Ageometry">geometry</a>,
<a href="/wiki/doku.php/tag:scenegraph?do=showtag&amp;tag=tag%3Ascenegraph">scenegraph</a>
</span></div>
</div> </div>
<!-- EDIT2 SECTION "Vertex Buffer" [1217-] --> <!-- EDIT2 SECTION "Vertex Buffer" [1217-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:mesh?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:mesh?do=export_xhtmlbody">view online version</a></em></p>

@ -72,8 +72,19 @@ ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor&#40;4&#41
Pool size means the executor will keep four threads alive at any time. Having more threads in the pool means that more tasks can run concurrently. But a bigger pool only results in a speed gain if the PC can handle it! Allocating a pool that is uselessly large just wastes memory, so you need to find a good compromise: About the same to double the size of the number of cores in the computer makes sense. Pool size means the executor will keep four threads alive at any time. Having more threads in the pool means that more tasks can run concurrently. But a bigger pool only results in a speed gain if the PC can handle it! Allocating a pool that is uselessly large just wastes memory, so you need to find a good compromise: About the same to double the size of the number of cores in the computer makes sense.
</p> </p>
<p>
!!! Executor needs to be shut down when the application ends, in order to make the process die properly
In your simple application you can override the stop method and shutdown the executor :
</p>
<pre> @Override
public void stop&#40;&#41; &#123;
super.stop&#40;&#41;;
executor.shutdown&#40;&#41;;
&#125;</pre>
</div> </div>
<!-- EDIT4 SECTION "Executor" [2879-3637] --> <!-- EDIT4 SECTION "Executor" [2879-3946] -->
<h3><a>Control Class Fields</a></h3> <h3><a>Control Class Fields</a></h3>
<div> <div>
@ -93,7 +104,7 @@ Here we also created the Future variable to track the state of this task.
</p> </p>
</div> </div>
<!-- EDIT5 SECTION "Control Class Fields" [3638-4228] --> <!-- EDIT5 SECTION "Control Class Fields" [3947-4537] -->
<h3><a>Control Update() Method</a></h3> <h3><a>Control Update() Method</a></h3>
<div> <div>
@ -141,7 +152,7 @@ Remember not to mess with the class fields after starting the thread, because th
</p> </p>
</div> </div>
<!-- EDIT6 SECTION "Control Update() Method" [4229-6099] --> <!-- EDIT6 SECTION "Control Update() Method" [4538-6408] -->
<h3><a>The Callable</a></h3> <h3><a>The Callable</a></h3>
<div> <div>
@ -193,7 +204,7 @@ private Callable&lt;MyWayList&gt; findWay = new Callable&lt;MyWayList&gt;&#40;&#
&#125;;</pre> &#125;;</pre>
</div> </div>
<!-- EDIT7 SECTION "The Callable" [6100-8467] --> <!-- EDIT7 SECTION "The Callable" [6409-8776] -->
<h3><a>The jME3 Threading Model</a></h3> <h3><a>The jME3 Threading Model</a></h3>
<div> <div>
@ -220,7 +231,7 @@ If the processing thread needs to wait or needs the return value then <code>get(
</p> </p>
</div> </div>
<!-- EDIT8 SECTION "The jME3 Threading Model" [8468-9583] --> <!-- EDIT8 SECTION "The jME3 Threading Model" [8777-9892] -->
<h2><a>Conclusion</a></h2> <h2><a>Conclusion</a></h2>
<div> <div>
@ -239,5 +250,5 @@ The cool thing about this approach is that every entity creates one self-contain
</span></div> </span></div>
</div> </div>
<!-- EDIT9 SECTION "Conclusion" [9584-] --> <!-- EDIT9 SECTION "Conclusion" [9893-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:multithreading?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:multithreading?do=export_xhtmlbody">view online version</a></em></p>

@ -69,7 +69,7 @@ You can register several types of listeners to be notified of changes.
The game server is a &quot;headless&quot; com.jme3.app.SimpleApplication: The game server is a &quot;headless&quot; com.jme3.app.SimpleApplication:
</p> </p>
<pre>public class MyGameServer extends SimpleApplication &#123; <pre>public class ServerMain extends SimpleApplication &#123;
public static void main&#40;String&#91;&#93; args&#41; &#123; public static void main&#40;String&#91;&#93; args&#41; &#123;
ServerMain app = new ServerMain&#40;&#41;; ServerMain app = new ServerMain&#40;&#41;;
app.start&#40;JmeContext.Type.Headless&#41;; // headless type for servers! app.start&#40;JmeContext.Type.Headless&#41;; // headless type for servers!
@ -96,7 +96,7 @@ When you run this app on a host, the server is ready to accept clients. Let&#039
</p> </p>
</div> </div>
<!-- EDIT5 SECTION "Creating a Server" [2418-3370] --> <!-- EDIT5 SECTION "Creating a Server" [2418-3368] -->
<h3><a>Creating a Client</a></h3> <h3><a>Creating a Client</a></h3>
<div> <div>
@ -104,7 +104,7 @@ When you run this app on a host, the server is ready to accept clients. Let&#039
A game client is a standard com.jme3.app.SimpleApplication. A game client is a standard com.jme3.app.SimpleApplication.
</p> </p>
<pre>public class MyGameClient extends SimpleApplication &#123; <pre>public class ClientMain extends SimpleApplication &#123;
public static void main&#40;String&#91;&#93; args&#41; &#123; public static void main&#40;String&#91;&#93; args&#41; &#123;
ClientMain app = new ClientMain&#40;&#41;; ClientMain app = new ClientMain&#40;&#41;;
app.start&#40;JmeContext.Type.Display&#41;; // standard display type app.start&#40;JmeContext.Type.Display&#41;; // standard display type
@ -135,7 +135,7 @@ When you run this client, it connects to the server.
</p> </p>
</div> </div>
<!-- EDIT6 SECTION "Creating a Client" [3371-4538] --> <!-- EDIT6 SECTION "Creating a Client" [3369-4534] -->
<h3><a>Getting Info About a Client</a></h3> <h3><a>Getting Info About a Client</a></h3>
<div> <div>
@ -158,7 +158,7 @@ The server refers to a connected client as com.jme3.network.HostedConnection obj
<td>myServer.getConnection(0)</td><td>Server gets the first (0), second (1), etc, connected HostedConnection object (one client).</td> <td>myServer.getConnection(0)</td><td>Server gets the first (0), second (1), etc, connected HostedConnection object (one client).</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT8 TABLE [4715-5094] --> <!-- EDIT8 TABLE [4711-5090] -->
<p> <p>
Your game can define its own game data based on whatever criteria you want, typically these include player ID and state. If the server needs to look up player/client-specific information, you can store this information directly on the HostedConnection object. The following examples read and write a custom Java object <code>MyState</code> in the HostedConnection object <code>conn</code>: Your game can define its own game data based on whatever criteria you want, typically these include player ID and state. If the server needs to look up player/client-specific information, you can store this information directly on the HostedConnection object. The following examples read and write a custom Java object <code>MyState</code> in the HostedConnection object <code>conn</code>:
@ -175,14 +175,14 @@ Your game can define its own game data based on whatever criteria you want, typi
<td> MyState state = conn.getAttribute(&quot;MyState&quot;)</td><td> Server can read an attribute of the HostedConnection. </td> <td> MyState state = conn.getAttribute(&quot;MyState&quot;)</td><td> Server can read an attribute of the HostedConnection. </td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT9 TABLE [5469-5698] --> <!-- EDIT9 TABLE [5465-5694] -->
</div> </div>
<!-- EDIT7 SECTION "Getting Info About a Client" [4539-5699] --> <!-- EDIT7 SECTION "Getting Info About a Client" [4535-5695] -->
<h2><a>Messaging</a></h2> <h2><a>Messaging</a></h2>
<div> <div>
</div> </div>
<!-- EDIT10 SECTION "Messaging" [5700-5722] --> <!-- EDIT10 SECTION "Messaging" [5696-5718] -->
<h3><a>Creating Message Types</a></h3> <h3><a>Creating Message Types</a></h3>
<div> <div>
@ -203,7 +203,7 @@ You must register each message type to the com.jme3.network.serializing.Serializ
<pre>Serializer.registerClass&#40;HelloMessage.class&#41;;</pre> <pre>Serializer.registerClass&#40;HelloMessage.class&#41;;</pre>
</div> </div>
<!-- EDIT11 SECTION "Creating Message Types" [5723-6675] --> <!-- EDIT11 SECTION "Creating Message Types" [5719-6671] -->
<h3><a>Responding to Messages</a></h3> <h3><a>Responding to Messages</a></h3>
<div> <div>
@ -260,7 +260,7 @@ For each message type, register a server listener to the server:
<pre>myServer.addMessageListener&#40;new ServerListener&#40;&#41;, HelloMessage.class&#41;;</pre> <pre>myServer.addMessageListener&#40;new ServerListener&#40;&#41;, HelloMessage.class&#41;;</pre>
</div> </div>
<!-- EDIT12 SECTION "Responding to Messages" [6676-8420] --> <!-- EDIT12 SECTION "Responding to Messages" [6672-8416] -->
<h3><a>Creating and Sending Messages</a></h3> <h3><a>Creating and Sending Messages</a></h3>
<div> <div>
@ -297,7 +297,7 @@ The last two broadcasting methods use com.jme3.network.Filters to select a subse
</p> </p>
</div> </div>
<!-- EDIT13 SECTION "Creating and Sending Messages" [8421-9510] --> <!-- EDIT13 SECTION "Creating and Sending Messages" [8417-9506] -->
<h2><a>Identification and Rejection</a></h2> <h2><a>Identification and Rejection</a></h2>
<div> <div>
@ -328,7 +328,7 @@ A server has a game version and game name property. Each client expects to commu
<td> myClient.getVersion() </td><td> Client queries the version of the server it is connected to. </td> <td> myClient.getVersion() </td><td> Client queries the version of the server it is connected to. </td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT15 TABLE [10102-10471] --> <!-- EDIT15 TABLE [10098-10467] -->
<p> <p>
<p><div>Typically, your networked game defines its own attributes (such as player ID) based on whatever criteria you want. If you want to look up player/client-specific information beyond the game version, you can set this information directly on the Client/HostedConnection object (see Getting Info About a Client). <p><div>Typically, your networked game defines its own attributes (such as player ID) based on whatever criteria you want. If you want to look up player/client-specific information beyond the game version, you can set this information directly on the Client/HostedConnection object (see Getting Info About a Client).
@ -336,12 +336,12 @@ A server has a game version and game name property. Each client expects to commu
</p> </p>
</div> </div>
<!-- EDIT14 SECTION "Identification and Rejection" [9511-10799] --> <!-- EDIT14 SECTION "Identification and Rejection" [9507-10795] -->
<h2><a>Closing Clients and Server Cleanly</a></h2> <h2><a>Closing Clients and Server Cleanly</a></h2>
<div> <div>
</div> </div>
<!-- EDIT16 SECTION "Closing Clients and Server Cleanly" [10800-10846] --> <!-- EDIT16 SECTION "Closing Clients and Server Cleanly" [10796-10842] -->
<h3><a>Closing a Client</a></h3> <h3><a>Closing a Client</a></h3>
<div> <div>
@ -357,7 +357,7 @@ You must override the client&#039;s destroy() method to close the connection cle
&#125;</pre> &#125;</pre>
</div> </div>
<!-- EDIT17 SECTION "Closing a Client" [10847-11122] --> <!-- EDIT17 SECTION "Closing a Client" [10843-11118] -->
<h3><a>Closing a Server</a></h3> <h3><a>Closing a Server</a></h3>
<div> <div>
@ -373,7 +373,7 @@ You must override the server&#039;s destroy() method to close the connection whe
&#125;</pre> &#125;</pre>
</div> </div>
<!-- EDIT18 SECTION "Closing a Server" [11123-11379] --> <!-- EDIT18 SECTION "Closing a Server" [11119-11375] -->
<h3><a>Kicking a Client</a></h3> <h3><a>Kicking a Client</a></h3>
<div> <div>
@ -384,7 +384,7 @@ The server can kick a HostedConnection to make it disconnect. You should provide
<pre>conn.close&#40;&quot;We kick cheaters.&quot;&#41;;</pre> <pre>conn.close&#40;&quot;We kick cheaters.&quot;&#41;;</pre>
</div> </div>
<!-- EDIT19 SECTION "Kicking a Client" [11380-11770] --> <!-- EDIT19 SECTION "Kicking a Client" [11376-11766] -->
<h2><a>Listening to Connection Notification</a></h2> <h2><a>Listening to Connection Notification</a></h2>
<div> <div>
@ -394,7 +394,7 @@ The server and clients are notified about connection changes.
</p> </p>
</div> </div>
<!-- EDIT20 SECTION "Listening to Connection Notification" [11771-11882] --> <!-- EDIT20 SECTION "Listening to Connection Notification" [11767-11878] -->
<h3><a>ClientStateListener</a></h3> <h3><a>ClientStateListener</a></h3>
<div> <div>
@ -414,7 +414,7 @@ The com.jme3.network.ClientStateListener notifies the Client when the Client has
<td> public void clientDisconnected(Client c, DisconnectInfo info){} </td><td> Implement here what happens after the server kicks this client. For example, display the DisconnectInfo to the user. </td> <td> public void clientDisconnected(Client c, DisconnectInfo info){} </td><td> Implement here what happens after the server kicks this client. For example, display the DisconnectInfo to the user. </td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT22 TABLE [12125-12494] --> <!-- EDIT22 TABLE [12121-12490] -->
<p> <p>
First implement the ClientStateListener interface in the Client class. Then register it to myClient in MyGameClient&#039;s simpleInitApp() method: First implement the ClientStateListener interface in the Client class. Then register it to myClient in MyGameClient&#039;s simpleInitApp() method:
@ -422,7 +422,7 @@ First implement the ClientStateListener interface in the Client class. Then regi
<pre>myClient.addClientStateListener&#40;this&#41;;</pre> <pre>myClient.addClientStateListener&#40;this&#41;;</pre>
</div> </div>
<!-- EDIT21 SECTION "ClientStateListener" [11883-12696] --> <!-- EDIT21 SECTION "ClientStateListener" [11879-12692] -->
<h3><a>ConnectionListener</a></h3> <h3><a>ConnectionListener</a></h3>
<div> <div>
@ -442,7 +442,7 @@ The com.jme3.network.ConnectionListener notifies the Server whenever new HostedC
<td> public void connectionRemoved(Server s, HostedConnection c){} </td><td> Implement here what happens after a HostedConnection has left. E.g. a player has quit the game and the server removes his character. </td> <td> public void connectionRemoved(Server s, HostedConnection c){} </td><td> Implement here what happens after a HostedConnection has left. E.g. a player has quit the game and the server removes his character. </td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT24 TABLE [12962-13360] --> <!-- EDIT24 TABLE [12958-13356] -->
<p> <p>
First implement the ConnectionListener interface in the Server class. Then register it to myServer in MyGameServer&#039;s simpleInitApp() method. First implement the ConnectionListener interface in the Server class. Then register it to myServer in MyGameServer&#039;s simpleInitApp() method.
@ -451,7 +451,7 @@ First implement the ConnectionListener interface in the Server class. Then regis
<pre>myServer.addConnectionListener&#40;this&#41;;</pre> <pre>myServer.addConnectionListener&#40;this&#41;;</pre>
</div> </div>
<!-- EDIT23 SECTION "ConnectionListener" [12697-13560] --> <!-- EDIT23 SECTION "ConnectionListener" [12693-13556] -->
<h2><a>UDP versus TCP</a></h2> <h2><a>UDP versus TCP</a></h2>
<div> <div>
@ -469,7 +469,7 @@ message2.setReliable&#40;false&#41;; // UDP</pre>
</ul> </ul>
</div> </div>
<!-- EDIT25 SECTION "UDP versus TCP" [13561-14231] --> <!-- EDIT25 SECTION "UDP versus TCP" [13557-14227] -->
<h2><a>Important: Use Multi-Threading</a></h2> <h2><a>Important: Use Multi-Threading</a></h2>
<div> <div>
@ -493,7 +493,7 @@ For general advice, see the articles <object classid="java:org.netbeans.modules.
</p> </p>
</div> </div>
<!-- EDIT26 SECTION "Important: Use Multi-Threading" [14232-15378] --> <!-- EDIT26 SECTION "Important: Use Multi-Threading" [14228-15374] -->
<h2><a>Troubleshooting</a></h2> <h2><a>Troubleshooting</a></h2>
<div> <div>
@ -508,5 +508,5 @@ If you have set up a server in your home network, and the game clients cannot re
</span></div> </span></div>
</div> </div>
<!-- EDIT27 SECTION "Troubleshooting" [15379-] --> <!-- EDIT27 SECTION "Troubleshooting" [15375-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:networking?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:networking?do=export_xhtmlbody">view online version</a></em></p>

@ -12,7 +12,7 @@ The awesome SeaMonkey WaterFilter is highly configurable. It can render any type
</p> </p>
<p> <p>
<p><div>The SeaMonkey WaterFilter is ideal for oceans and lakes, and expecially for under-water scenes. If you only need a small simple water surface, such as a water trough or a shallow fountain, the <a href="/com/jme3/gde/core/docs/jme3/advanced/water.html">SimpleWaterProcessor</a> may already be all you need. <p><div>The SeaMonkey WaterFilter is ideal for oceans and lakes, and especially for under-water scenes. If you only need a small simple water surface, such as a water trough or a shallow fountain, the <a href="/com/jme3/gde/core/docs/jme3/advanced/water.html">SimpleWaterProcessor</a> may already be all you need.
</div></p> </div></p>
</p> </p>
@ -286,7 +286,7 @@ See also:
<ul> <ul>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://jmonkeyengine.org/2011/01/15/new-advanced-water-effect-for-jmonkeyengine-3/#comment-609"><param name="text" value="<html><u>JME3&#039;s Water Post-Process Effect</u></html>"><param name="textColor" value="blue"></object> by Nehon</div> <li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://jmonkeyengine.org/2011/01/15/new-advanced-water-effect-for-jmonkeyengine-3/#comment-609"><param name="text" value="<html><u>JME3&#039;s Water Post-Process Effect</u></html>"><param name="textColor" value="blue"></object> by Nehon</div>
</li> </li>
<li><div> <a href="/com/jme3/gde/core/docs/jme/advanced/water.html">Simple water</a></div> <li><div> <a href="/com/jme3/gde/core/docs/jme3/advanced/water.html">Simple water</a></div>
</li> </li>
</ul> </ul>

@ -101,7 +101,7 @@ Example: You used something like <code>mySpatial.setUserData(&quot;inventory&quo
</ul> </ul>
<p> <p>
If your custom classes (the user data or the Controls) do not implement Savable, then the BinaryImporter/BinaryExporter cannot save the Spatial! If your custom classes (the user data or the Controls) do not implement Savable, then the BinaryImporter/BinaryExporter cannot save the Spatial!
</p> </p>
<p> <p>
@ -179,7 +179,13 @@ To make a custom class savable:
<a href="/wiki/doku.php/tag:documentation?do=showtag&amp;tag=tag%3Adocumentation">documentation</a>, <a href="/wiki/doku.php/tag:documentation?do=showtag&amp;tag=tag%3Adocumentation">documentation</a>,
<a href="/wiki/doku.php/tag:serialization?do=showtag&amp;tag=tag%3Aserialization">serialization</a>, <a href="/wiki/doku.php/tag:serialization?do=showtag&amp;tag=tag%3Aserialization">serialization</a>,
<a href="/wiki/doku.php/tag:import?do=showtag&amp;tag=tag%3Aimport">import</a>, <a href="/wiki/doku.php/tag:import?do=showtag&amp;tag=tag%3Aimport">import</a>,
<a href="/wiki/doku.php/tag:export?do=showtag&amp;tag=tag%3Aexport">export</a> <a href="/wiki/doku.php/tag:export?do=showtag&amp;tag=tag%3Aexport">export</a>,
<a href="/wiki/doku.php/tag:spatial?do=showtag&amp;tag=tag%3Aspatial">spatial</a>,
<a href="/wiki/doku.php/tag:node?do=showtag&amp;tag=tag%3Anode">node</a>,
<a href="/wiki/doku.php/tag:mesh?do=showtag&amp;tag=tag%3Amesh">mesh</a>,
<a href="/wiki/doku.php/tag:geometry?do=showtag&amp;tag=tag%3Ageometry">geometry</a>,
<a href="/wiki/doku.php/tag:scenegraph?do=showtag&amp;tag=tag%3Ascenegraph">scenegraph</a>,
<a href="/wiki/doku.php/tag:sdk?do=showtag&amp;tag=tag%3Asdk">sdk</a>
</span></div> </span></div>
</div> </div>

@ -186,6 +186,13 @@ rootNode.attachChild&#40;geom&#41;; // attach geometry to a n
* <a href="/com/jme3/gde/core/docs/jme3/intermediate/optimization.html">Optimization</a> – The GeometryBatchFactory class combines several of your shapes with the same texture into one mesh with one texture. * <a href="/com/jme3/gde/core/docs/jme3/intermediate/optimization.html">Optimization</a> – The GeometryBatchFactory class combines several of your shapes with the same texture into one mesh with one texture.
</p> </p>
<div><span>
<a href="/wiki/doku.php/tag:spatial?do=showtag&amp;tag=tag%3Aspatial">spatial</a>,
<a href="/wiki/doku.php/tag:node?do=showtag&amp;tag=tag%3Anode">node</a>,
<a href="/wiki/doku.php/tag:mesh?do=showtag&amp;tag=tag%3Amesh">mesh</a>,
<a href="/wiki/doku.php/tag:geometry?do=showtag&amp;tag=tag%3Ageometry">geometry</a>,
<a href="/wiki/doku.php/tag:scenegraph?do=showtag&amp;tag=tag%3Ascenegraph">scenegraph</a>
</span></div>
</div> </div>
<!-- EDIT6 SECTION "See also" [5360-] --> <!-- EDIT6 SECTION "See also" [5360-] -->

@ -22,7 +22,7 @@ If you think you need to understand the scene graph concept better, please read
<p> <p>
In your Java code, a Spatial is either a <code>com.jme3.scene.Node</code> or a <code>com.jme3.scene.Geometry</code> instance. You use the two types of Spatials for different purposes: In your Java code, a Spatial is either an instance of <code>com.jme3.scene.Node</code> or a <code>com.jme3.scene.Geometry</code> instance. You use the two types of Spatials for different purposes:
</p> </p>
<p> <p>
@ -34,7 +34,7 @@ In your Java code, a Spatial is either a <code>com.jme3.scene.Node</code> or a <
<td> </td><th>com.jme3.scene.Spatial </th> <td> </td><th>com.jme3.scene.Spatial </th>
</tr> </tr>
<tr> <tr>
<th> Purpose: </th><td> A Spatial is an abstract data structure that stores transformations (= translation, rotation, scale) of elements of the 3D scene graph. Spatials can be saved and loaded using the <a href="/com/jme3/gde/core/docs/jme3/advanced/asset_manager.html">Asset Manager</a>. </td> <th> Purpose: </th><td> A Spatial is an abstract data structure that stores user data and transformations (= translation, rotation, scale) of elements of the 3D scene graph. Spatials can be saved and loaded using the <a href="/com/jme3/gde/core/docs/jme3/advanced/asset_manager.html">Asset Manager</a>. </td>
</tr> </tr>
<tr> <tr>
<td> </td><th> com.jme3.scene.Geometry </th><th> com.jme3.scene.Node </th> <td> </td><th> com.jme3.scene.Geometry </th><th> com.jme3.scene.Node </th>
@ -56,15 +56,15 @@ no mesh, no material.</td>
<th> Examples: </th><td> Box, sphere, player, building, terrain, vehicle, missiles, NPCs, etc… </td><td> rootNode, guiNode, audioNode, a custom grouping node such as vehicleNode or shipNode with passengers attached, etc. </td> <th> Examples: </th><td> Box, sphere, player, building, terrain, vehicle, missiles, NPCs, etc… </td><td> rootNode, guiNode, audioNode, a custom grouping node such as vehicleNode or shipNode with passengers attached, etc. </td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT3 TABLE [1178-2522] --> <!-- EDIT3 TABLE [1191-2549] -->
<p> <p>
<p><div>You never create a Spatial with <code><del>Spatial s = new Spatial();</del></code>! A Spatial is an abstract concept, like a mammal (there is no actual creature called &quot;mammal&quot; walking around here). You create either a com.jme3.scene.Node, or a com.jme3.scene.Geometry object. Some methods, however, require a spatial as argument: This is because they are able to accept both Nodes and Geometries as arguments. In this case, you simply <em>cast</em> a Node or Geometry to Spatial. <p><div>You never create a Spatial with <code><del>Spatial s = new Spatial();</del></code>! A Spatial is an abstract concept, like a mammal (there is no actual creature called &quot;mammal&quot; walking around here). You create either a com.jme3.scene.Node or com.jme3.scene.Geometry instance. Some methods, however, require a <code>Spatial</code> type as argument: This is because they are able to accept both Nodes and Geometries as arguments. In this case, you simply <em>cast</em> a Node or Geometry to Spatial.
</div></p> </div></p>
</p> </p>
</div> </div>
<!-- EDIT2 SECTION "Node versus Geometry" [935-3014] --> <!-- EDIT2 SECTION "Node versus Geometry" [935-3049] -->
<h3><a>Mesh</a></h3> <h3><a>Mesh</a></h3>
<div> <div>
@ -83,7 +83,7 @@ The polygon <a href="/com/jme3/gde/core/docs/jme3/advanced/mesh.html">Mesh</a> i
</ul> </ul>
</div> </div>
<!-- EDIT4 SECTION "Mesh" [3015-3694] --> <!-- EDIT4 SECTION "Mesh" [3050-3729] -->
<h2><a>What is a Clone?</a></h2> <h2><a>What is a Clone?</a></h2>
<div> <div>
@ -112,7 +112,7 @@ Usually there is no need to manually use any of the <code>clone()</code> methods
</p> </p>
</div> </div>
<!-- EDIT5 SECTION "What is a Clone?" [3695-4950] --> <!-- EDIT5 SECTION "What is a Clone?" [3730-4985] -->
<h2><a>How to Add Fields and Methods to a Spatial</a></h2> <h2><a>How to Add Fields and Methods to a Spatial</a></h2>
<div> <div>
@ -171,7 +171,7 @@ This is how you list all data keys that are already defined for one Spatial:
&#125;</pre> &#125;</pre>
</div> </div>
<!-- EDIT6 SECTION "How to Add Fields and Methods to a Spatial" [4951-7527] --> <!-- EDIT6 SECTION "How to Add Fields and Methods to a Spatial" [4986-7562] -->
<h2><a>How to Access a Named Sub-Mesh</a></h2> <h2><a>How to Access a Named Sub-Mesh</a></h2>
<div> <div>
@ -196,15 +196,23 @@ In the following example, the Node <code>house</code> is the loaded model. The s
<pre>Geometry submesh = &#40;Geometry&#41; houseScene.getChild&#40;&quot;door 12&quot;&#41;;</pre> <pre>Geometry submesh = &#40;Geometry&#41; houseScene.getChild&#40;&quot;door 12&quot;&#41;;</pre>
</div> </div>
<!-- EDIT7 SECTION "How to Access a Named Sub-Mesh" [7528-8331] --> <!-- EDIT7 SECTION "How to Access a Named Sub-Mesh" [7563-8366] -->
<h2><a>See also</a></h2> <h2><a>See also</a></h2>
<div> <div>
<ul>
<p> <li><div> <a href="/com/jme3/gde/core/docs/jme3/intermediate/optimization.html">Optimization</a> – The GeometryBatchFactory class batches several Geometries into meshes with each their own texture.</div>
</li>
* <a href="/com/jme3/gde/core/docs/jme3/intermediate/optimization.html">Optimization</a> – The GeometryBatchFactory class batches several Geometries into meshes with each their own texture. <li><div> <a href="/com/jme3/gde/core/docs/jme3/advanced/traverse_scenegraph.html">Traverse SceneGraph</a> – Find any Node or Geometry in the scenegraph.</div>
</p> </li>
</ul>
<div><span>
<a href="/wiki/doku.php/tag:spatial?do=showtag&amp;tag=tag%3Aspatial">spatial</a>,
<a href="/wiki/doku.php/tag:node?do=showtag&amp;tag=tag%3Anode">node</a>,
<a href="/wiki/doku.php/tag:mesh?do=showtag&amp;tag=tag%3Amesh">mesh</a>,
<a href="/wiki/doku.php/tag:geometry?do=showtag&amp;tag=tag%3Ageometry">geometry</a>,
<a href="/wiki/doku.php/tag:scenegraph?do=showtag&amp;tag=tag%3Ascenegraph">scenegraph</a>
</span></div>
</div> </div>
<!-- EDIT8 SECTION "See also" [8332-] --> <!-- EDIT8 SECTION "See also" [8367-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:spatial?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:spatial?do=export_xhtmlbody">view online version</a></em></p>

@ -163,9 +163,9 @@ Here are the names of TerrainLighting.j3md&#039;s material properties:
</li> </li>
<li><div> <code>DiffuseMap_4</code>, <code>DiffuseMap_4_scale</code>, <code>NormalMap_4</code></div> <li><div> <code>DiffuseMap_4</code>, <code>DiffuseMap_4_scale</code>, <code>NormalMap_4</code></div>
</li> </li>
<li><div> <code>DiffuseMap_5</code>, <code>DiffuseMap_5_scale</code>, <code>NormalMap_5</code></div> <li><div> </div>
</li> </li>
<li><div> <code>DiffuseMap_6</code>, <code>DiffuseMap_6_scale</code>, …, <code>DiffuseMap_11</code></div> <li><div> <code>DiffuseMap_11</code>, <code>DiffuseMap_11_scale</code>, <code>NormalMap_11</code></div>
</li> </li>
</ul> </ul>
</li> </li>
@ -193,11 +193,11 @@ Adhere to the following constraints:
<img src="/wiki/lib/exe/fetch.php"> <img src="/wiki/lib/exe/fetch.php">
</p> </p>
<ul> <ul>
<li><div> 1-12 Diffuse Maps (one Diffuse Map is the minimum)</div> <li><div> 1-12 Diffuse Maps. One Diffuse Map is the minimum!</div>
</li> </li>
<li><div> 1-3 Alpha Maps (for each 4 Diffuse Maps, you need 1 more Alpha Map!)</div> <li><div> 1-3 Alpha Maps. For each 4 Diffuse Maps, you need 1 more Alpha Map!</div>
</li> </li>
<li><div> 0-6 Normal Maps (Diffuse Maps &amp; Normal Maps come in pairs!)</div> <li><div> 0-6 Normal Maps. Diffuse Maps &amp; Normal Maps always come in pairs!</div>
</li> </li>
<li><div> 0 or 1 Glow Map</div> <li><div> 0 or 1 Glow Map</div>
</li> </li>
@ -213,11 +213,11 @@ Here are some common examples what this means:
<img src="/wiki/lib/exe/fetch.php"> <img src="/wiki/lib/exe/fetch.php">
</p> </p>
<ul> <ul>
<li><div> 3 Alpha + 12 Diffuse + 1 Normal. </div> <li><div> 3 Alpha + 11 Diffuse + 1 Normal. </div>
</li> </li>
<li><div> 3 Alpha + 12 Diffuse + 1 Glow. </div> <li><div> 3 Alpha + 11 Diffuse + 1 Glow. </div>
</li> </li>
<li><div> 3 Alpha + 12 Diffuse + 1 Specular. </div> <li><div> 3 Alpha + 11 Diffuse + 1 Specular. </div>
</li> </li>
<li><div> 3 Alpha + 10 Diffuse + 3 Normal. </div> <li><div> 3 Alpha + 10 Diffuse + 3 Normal. </div>
</li> </li>
@ -237,7 +237,7 @@ You can hand-paint Alpha, Diffuse, Glow, and Specular maps in a drawing program,
</p> </p>
</div> </div>
<!-- EDIT8 SECTION "Texture Splatting" [5218-9488] --> <!-- EDIT8 SECTION "Texture Splatting" [5218-9435] -->
<h2><a>Code Sample: Terrain.j3md</a></h2> <h2><a>Code Sample: Terrain.j3md</a></h2>
<div> <div>
@ -252,24 +252,24 @@ First, we load our textures and the heightmap texture for the terrain
<pre>// Create material from Terrain Material Definition <pre>// Create material from Terrain Material Definition
matRock = new Material&#40;assetManager, &quot;Common/MatDefs/Terrain/Terrain.j3md&quot;&#41;; matRock = new Material&#40;assetManager, &quot;Common/MatDefs/Terrain/Terrain.j3md&quot;&#41;;
// Load alpha map (for splat textures) // Load alpha map (for splat textures)
matRock.setTexture&#40;&quot;m_Alpha&quot;, assetManager.loadTexture&#40;&quot;Textures/Terrain/splat/alphamap.png&quot;&#41;&#41;; matRock.setTexture&#40;&quot;Alpha&quot;, assetManager.loadTexture&#40;&quot;Textures/Terrain/splat/alphamap.png&quot;&#41;&#41;;
// load heightmap image (for the terrain heightmap) // load heightmap image (for the terrain heightmap)
Texture heightMapImage = assetManager.loadTexture&#40;&quot;Textures/Terrain/splat/mountains512.png&quot;&#41;; Texture heightMapImage = assetManager.loadTexture&#40;&quot;Textures/Terrain/splat/mountains512.png&quot;&#41;;
// load grass texture // load grass texture
Texture grass = assetManager.loadTexture&#40;&quot;Textures/Terrain/splat/grass.jpg&quot;&#41;; Texture grass = assetManager.loadTexture&#40;&quot;Textures/Terrain/splat/grass.jpg&quot;&#41;;
grass.setWrap&#40;WrapMode.Repeat&#41;; grass.setWrap&#40;WrapMode.Repeat&#41;;
matRock.setTexture&#40;&quot;m_Tex1&quot;, grass&#41;; matRock.setTexture&#40;&quot;Tex1&quot;, grass&#41;;
matRock.setFloat&#40;&quot;m_Tex1Scale&quot;, 64f&#41;; matRock.setFloat&#40;&quot;Tex1Scale&quot;, 64f&#41;;
// load dirt texture // load dirt texture
Texture dirt = assetManager.loadTexture&#40;&quot;Textures/Terrain/splat/dirt.jpg&quot;&#41;; Texture dirt = assetManager.loadTexture&#40;&quot;Textures/Terrain/splat/dirt.jpg&quot;&#41;;
dirt.setWrap&#40;WrapMode.Repeat&#41;; dirt.setWrap&#40;WrapMode.Repeat&#41;;
matRock.setTexture&#40;&quot;m_Tex2&quot;, dirt&#41;; matRock.setTexture&#40;&quot;Tex2&quot;, dirt&#41;;
matRock.setFloat&#40;&quot;m_Tex2Scale&quot;, 32f&#41;; matRock.setFloat&#40;&quot;Tex2Scale&quot;, 32f&#41;;
// load rock texture // load rock texture
Texture rock = assetManager.loadTexture&#40;&quot;Textures/Terrain/splat/road.jpg&quot;&#41;; Texture rock = assetManager.loadTexture&#40;&quot;Textures/Terrain/splat/road.jpg&quot;&#41;;
rock.setWrap&#40;WrapMode.Repeat&#41;; rock.setWrap&#40;WrapMode.Repeat&#41;;
matRock.setTexture&#40;&quot;m_Tex3&quot;, rock&#41;; matRock.setTexture&#40;&quot;Tex3&quot;, rock&#41;;
matRock.setFloat&#40;&quot;m_Tex3Scale&quot;, 128f&#41;;</pre> matRock.setFloat&#40;&quot;Tex3Scale&quot;, 128f&#41;;</pre>
<p> <p>
We create the heightmap from the <code>heightMapImage</code>. We create the heightmap from the <code>heightMapImage</code>.
@ -291,8 +291,6 @@ Next we create the actual terrain.
</ul> </ul>
<pre>terrain = new TerrainQuad&#40;&quot;terrain&quot;, 65, 513, heightmap.getHeightMap&#40;&#41;&#41;; <pre>terrain = new TerrainQuad&#40;&quot;terrain&quot;, 65, 513, heightmap.getHeightMap&#40;&#41;&#41;;
terrain.setMaterial&#40;matRock&#41;; terrain.setMaterial&#40;matRock&#41;;
terrain.setModelBound&#40;new BoundingBox&#40;&#41;&#41;;
terrain.updateModelBound&#40;&#41;;
terrain.setLocalScale&#40;2f, 1f, 2f&#41;; // scale to make it less steep terrain.setLocalScale&#40;2f, 1f, 2f&#41;; // scale to make it less steep
List&lt;Camera&gt; cameras = new ArrayList&lt;Camera&gt;&#40;&#41;; List&lt;Camera&gt; cameras = new ArrayList&lt;Camera&gt;&#40;&#41;;
cameras.add&#40;getCamera&#40;&#41;&#41;; cameras.add&#40;getCamera&#40;&#41;&#41;;
@ -306,5 +304,5 @@ PS: As an alternative to an image-based height map, you can also generate a Hill
<pre>heightmap = new HillHeightMap&#40;1025, 1000, 50, 100, &#40;byte&#41; 3&#41;;</pre> <pre>heightmap = new HillHeightMap&#40;1025, 1000, 50, 100, &#40;byte&#41; 3&#41;;</pre>
</div> </div>
<!-- EDIT9 SECTION "Code Sample: Terrain.j3md" [9489-] --> <!-- EDIT9 SECTION "Code Sample: Terrain.j3md" [9436-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:terrain?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:terrain?do=export_xhtmlbody">view online version</a></em></p>

@ -226,10 +226,12 @@ Activating the nbandroid plugin in the jMonkeyEngine <acronym title="Software De
</li> </li>
<li><div> To sign your application, edit the mobile/build.properties file to point at valid keystore files.</div> <li><div> To sign your application, edit the mobile/build.properties file to point at valid keystore files.</div>
</li> </li>
<li><div> If you get a FileNotFoundException for MANIFEST.FM when compiling with Android <acronym title="Software Development Kit">SDK</acronym> Rev. 20 you need to copy and paste mobile/AndroidManifest.xml to mobile/MANIFEST.MF (<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://jmonkeyengine.org/groups/android/forum/topic/issues-building-with-android-sdk-rev-20/"><param name="text" value="<html><u>http://jmonkeyengine.org/groups/android/forum/topic/issues-building-with-android-sdk-rev-20/</u></html>"><param name="textColor" value="blue"></object>)</div>
</li>
</ul> </ul>
</div> </div>
<!-- EDIT8 SECTION "Beta Instructions" [1824-6351] --> <!-- EDIT8 SECTION "Beta Instructions" [1824-6621] -->
<h2><a>Android Considerations</a></h2> <h2><a>Android Considerations</a></h2>
<div> <div>
@ -253,7 +255,7 @@ You can use the jMonkeyEngine <acronym title="Software Development Kit">SDK</acr
</p> </p>
</div> </div>
<!-- EDIT9 SECTION "Android Considerations" [6352-7718] --> <!-- EDIT9 SECTION "Android Considerations" [6622-7988] -->
<h2><a>Using Android specific functions</a></h2> <h2><a>Using Android specific functions</a></h2>
<div> <div>
@ -275,7 +277,7 @@ Note that you have to build the whole project once to make (new) classes in the
</p> </p>
</div> </div>
<!-- EDIT10 SECTION "Using Android specific functions" [7719-9499] --> <!-- EDIT10 SECTION "Using Android specific functions" [7989-9769] -->
<h2><a>More Info</a></h2> <h2><a>More Info</a></h2>
<div> <div>
@ -299,5 +301,5 @@ The <acronym title="Software Development Kit">SDK</acronym> will later provide t
</span></div> </span></div>
</div> </div>
<!-- EDIT11 SECTION "More Info" [9500-] --> <!-- EDIT11 SECTION "More Info" [9770-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:android?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:android?do=export_xhtmlbody">view online version</a></em></p>

@ -119,16 +119,12 @@ When you run the sample, you should see a blue cube. You should hear a nature-li
In the <code>initSimpleApp()</code> method, you create a simple blue cube geometry called <code>player</code> and attach it to the scene – this just arbitrary sample content, so you see something when running the audio sample. In the <code>initSimpleApp()</code> method, you create a simple blue cube geometry called <code>player</code> and attach it to the scene – this just arbitrary sample content, so you see something when running the audio sample.
</p> </p>
<p>
From <code>initSampleApp()</code>, you initialize the game by calling the two custom methods <code>initKeys()</code> and <code>initAudio()</code>. You could call the lines of code in these two methods directly from <code>initSampleApp()</code>; they merely are in extra methods to keep the code more readable.
</p>
<p> <p>
Let&#039;s have a closer look at <code>initAudio()</code> to learn how to use <code>AudioNode</code>s. Let&#039;s have a closer look at <code>initAudio()</code> to learn how to use <code>AudioNode</code>s.
</p> </p>
</div> </div>
<!-- EDIT3 SECTION "Understanding the Code Sample" [3517-4126] --> <!-- EDIT3 SECTION "Understanding the Code Sample" [3517-3851] -->
<h2><a>AudioNodes</a></h2> <h2><a>AudioNodes</a></h2>
<div> <div>
@ -184,7 +180,7 @@ Here you make audio_nature a positional sound that comes from a certain place. F
</p> </p>
</div> </div>
<!-- EDIT4 SECTION "AudioNodes" [4127-6788] --> <!-- EDIT4 SECTION "AudioNodes" [3852-6513] -->
<h2><a>Triggering Sound</a></h2> <h2><a>Triggering Sound</a></h2>
<div> <div>
@ -216,7 +212,7 @@ Since you want to be able to shoot fast repeatedly, so you do not want to wait f
</p> </p>
</div> </div>
<!-- EDIT5 SECTION "Triggering Sound" [6789-8253] --> <!-- EDIT5 SECTION "Triggering Sound" [6514-7978] -->
<h2><a>Ambient or Situational?</a></h2> <h2><a>Ambient or Situational?</a></h2>
<div> <div>
@ -265,7 +261,7 @@ Apart from the looping boolean, another difference is where <code>play().playIns
</ul> </ul>
</div> </div>
<!-- EDIT6 SECTION "Ambient or Situational?" [8254-9484] --> <!-- EDIT6 SECTION "Ambient or Situational?" [7979-9209] -->
<h2><a>Buffered or Streaming?</a></h2> <h2><a>Buffered or Streaming?</a></h2>
<div> <div>
@ -288,7 +284,7 @@ Note that streamed sounds can not loop (i.e. setLooping will not work as you exp
</p> </p>
</div> </div>
<!-- EDIT7 SECTION "Buffered or Streaming?" [9485-10066] --> <!-- EDIT7 SECTION "Buffered or Streaming?" [9210-9791] -->
<h2><a>Play() or PlayInstance()?</a></h2> <h2><a>Play() or PlayInstance()?</a></h2>
<div> <div>
<div><table> <div><table>
@ -305,9 +301,9 @@ Note that streamed sounds can not loop (i.e. setLooping will not work as you exp
<td>The same sound cannot play twice at the same time.</td><td>The same sounds can play multiple times and overlap.</td> <td>The same sound cannot play twice at the same time.</td><td>The same sounds can play multiple times and overlap.</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT9 TABLE [10106-10350] --> <!-- EDIT9 TABLE [9831-10075] -->
</div> </div>
<!-- EDIT8 SECTION "Play() or PlayInstance()?" [10067-10351] --> <!-- EDIT8 SECTION "Play() or PlayInstance()?" [9792-10076] -->
<h2><a>Your Ear in the Scene</a></h2> <h2><a>Your Ear in the Scene</a></h2>
<div> <div>
@ -329,7 +325,7 @@ If you don&#039;t do that, the results of 3D audio will be quite random.
</p> </p>
</div> </div>
<!-- EDIT10 SECTION "Your Ear in the Scene" [10352-11054] --> <!-- EDIT10 SECTION "Your Ear in the Scene" [10077-10779] -->
<h2><a>Global, Directional, Positional?</a></h2> <h2><a>Global, Directional, Positional?</a></h2>
<div> <div>
@ -356,7 +352,7 @@ In short, you must choose in every situation whether it makes sense for a sound
</p> </p>
</div> </div>
<!-- EDIT11 SECTION "Global, Directional, Positional?" [11055-12413] --> <!-- EDIT11 SECTION "Global, Directional, Positional?" [10780-12138] -->
<h2><a>Conclusion</a></h2> <h2><a>Conclusion</a></h2>
<div> <div>
@ -391,5 +387,5 @@ See also:
</span></div> </span></div>
</div> </div>
<!-- EDIT12 SECTION "Conclusion" [12414-] --> <!-- EDIT12 SECTION "Conclusion" [12139-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:beginner:hello_audio?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:beginner:hello_audio?do=export_xhtmlbody">view online version</a></em></p>

@ -259,15 +259,16 @@ You can also combine both listeners into one, the engine will send the appropria
&#125; &#125;
&#125; &#125;
// ... // ...
inputManager.addListener&#40;analogListener, new String&#91;&#93;&#123;&quot;Pause&quot;, &quot;Left&quot;, &quot;Right&quot;, &quot;Rotate&quot;&#125;&#41;; inputManager.addListener&#40;combinedListener, new String&#91;&#93;&#123;&quot;Pause&quot;, &quot;Left&quot;, &quot;Right&quot;, &quot;Rotate&quot;&#125;&#41;;
&nbsp;</pre> &nbsp;</pre>
<p> <p>
It&#039;s okay to use only one of the two Listeners, and not implement the other one, if you are not using this type of interaction. In the following, we have a closer look how to decide which of the two listeners is best suited for which situation. It&#039;s okay to use only one of the two Listeners, and not implement the other one, if you are not using this type of interaction. In the following, we have a closer look how to decide which of the two listeners is best suited for which situation.
</p> </p>
</div> </div>
<!-- EDIT4 SECTION "Implementing the Actions" [5894-9011] --> <!-- EDIT4 SECTION "Implementing the Actions" [5894-9012] -->
<h2><a>Analog, Pressed, or Released?</a></h2> <h2><a>Analog, Pressed, or Released?</a></h2>
<div> <div>
@ -324,7 +325,7 @@ Mappings registered to the <strong>ActionListener</strong> are digital either-or
&#125;</pre> &#125;</pre>
</div> </div>
<!-- EDIT5 SECTION "Analog, Pressed, or Released?" [9012-11037] --> <!-- EDIT5 SECTION "Analog, Pressed, or Released?" [9013-11038] -->
<h2><a>Table of Triggers</a></h2> <h2><a>Table of Triggers</a></h2>
<div> <div>
@ -360,14 +361,14 @@ You can find the list of input constants in the files <code>src/core/com/jme3/in
KeyTrigger(KeyInput.KEY_LEFT), KeyTrigger(KeyInput.KEY_RIGHT) </td> KeyTrigger(KeyInput.KEY_LEFT), KeyTrigger(KeyInput.KEY_RIGHT) </td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT7 TABLE [11270-11866] --> <!-- EDIT7 TABLE [11271-11867] -->
<p> <p>
<strong>Tip:</strong> If you don&#039;t recall an input constant during development, you benefit from an IDE&#039;s code completion functionality: Place the caret after e.g. <code>KeyInput.|</code> and trigger code completion to select possible input identifiers. <strong>Tip:</strong> If you don&#039;t recall an input constant during development, you benefit from an IDE&#039;s code completion functionality: Place the caret after e.g. <code>KeyInput.|</code> and trigger code completion to select possible input identifiers.
</p> </p>
</div> </div>
<!-- EDIT6 SECTION "Table of Triggers" [11038-12100] --> <!-- EDIT6 SECTION "Table of Triggers" [11039-12101] -->
<h2><a>Exercises</a></h2> <h2><a>Exercises</a></h2>
<div> <div>
<ol> <ol>
@ -395,7 +396,7 @@ inputManager.addMapping&#40;&quot;Pause&quot;, new KeyTrigger&#40;usersPauseKey
</p> </p>
</div> </div>
<!-- EDIT8 SECTION "Exercises" [12101-12785] --> <!-- EDIT8 SECTION "Exercises" [12102-12786] -->
<h2><a>Conclusion</a></h2> <h2><a>Conclusion</a></h2>
<div> <div>
@ -417,5 +418,5 @@ Now you can already write a little interactive game! But wouldn&#039;t it be coo
</span></div> </span></div>
</div> </div>
<!-- EDIT9 SECTION "Conclusion" [12786-] --> <!-- EDIT9 SECTION "Conclusion" [12787-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:beginner:hello_input_system?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:beginner:hello_input_system?do=export_xhtmlbody">view online version</a></em></p>

@ -65,20 +65,22 @@ public class HelloNode extends SimpleApplication &#123;
public void simpleInitApp&#40;&#41; &#123; public void simpleInitApp&#40;&#41; &#123;
&nbsp; &nbsp;
/** create a blue box at coordinates (1,-1,1) */ /** create a blue box at coordinates (1,-1,1) */
Box box1 = new Box&#40; new Vector3f&#40;1,-1,1&#41;, 1,1,1&#41;; Box box1 = new Box&#40; Vector3f.ZERO, 1,1,1&#41;;
Geometry blue = new Geometry&#40;&quot;Box&quot;, box1&#41;; Geometry blue = new Geometry&#40;&quot;Box&quot;, box1&#41;;
Material mat1 = new Material&#40;assetManager, Material mat1 = new Material&#40;assetManager,
&quot;Common/MatDefs/Misc/Unshaded.j3md&quot;&#41;; &quot;Common/MatDefs/Misc/Unshaded.j3md&quot;&#41;;
mat1.setColor&#40;&quot;Color&quot;, ColorRGBA.Blue&#41;; mat1.setColor&#40;&quot;Color&quot;, ColorRGBA.Blue&#41;;
blue.setMaterial&#40;mat1&#41;; blue.setMaterial&#40;mat1&#41;;
blue.move&#40;1,-1,1&#41;;
&nbsp; &nbsp;
/** create a red box straight above the blue one at (1,3,1) */ /** create a red box straight above the blue one at (1,3,1) */
Box box2 = new Box&#40; new Vector3f&#40;1,3,1&#41;, 1,1,1&#41;; Box box2 = new Box&#40; Vector3f.ZERO, 1,1,1&#41;;
Geometry red = new Geometry&#40;&quot;Box&quot;, box2&#41;; Geometry red = new Geometry&#40;&quot;Box&quot;, box2&#41;;
Material mat2 = new Material&#40;assetManager, Material mat2 = new Material&#40;assetManager,
&quot;Common/MatDefs/Misc/Unshaded.j3md&quot;&#41;; &quot;Common/MatDefs/Misc/Unshaded.j3md&quot;&#41;;
mat2.setColor&#40;&quot;Color&quot;, ColorRGBA.Red&#41;; mat2.setColor&#40;&quot;Color&quot;, ColorRGBA.Red&#41;;
red.setMaterial&#40;mat2&#41;; red.setMaterial&#40;mat2&#41;;
red.move&#40;1,3,1&#41;;
&nbsp; &nbsp;
/** Create a pivot node at (0,0,0) and attach it to the root node */ /** Create a pivot node at (0,0,0) and attach it to the root node */
Node pivot = new Node&#40;&quot;pivot&quot;&#41;; Node pivot = new Node&#40;&quot;pivot&quot;&#41;;
@ -97,7 +99,7 @@ Build and run the code sample. You should see two colored boxes tilted at the sa
</p> </p>
</div> </div>
<!-- EDIT2 SECTION "Code Sample" [997-3001] --> <!-- EDIT2 SECTION "Code Sample" [997-3048] -->
<h2><a>Understanding the Terminology</a></h2> <h2><a>Understanding the Terminology</a></h2>
<div> <div>
@ -123,10 +125,10 @@ In this tutorial, you learn some new terms:
<td>Make an object disappear from the scene</td><td>Detach the Spatial from the rootNode</td> <td>Make an object disappear from the scene</td><td>Detach the Spatial from the rootNode</td>
</tr> </tr>
<tr> <tr>
<td>Position/move, turn, or resize an object</td><td>Translate, rotate, scale an object. Transform an object.</td> <td>Position/move, turn, or resize an object</td><td>Translate, or rotate, or scale an object = transform an object.</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT4 TABLE [3090-3507] --> <!-- EDIT4 TABLE [3137-3561] -->
<p> <p>
Every JME3 application has a rootNode: Your game automatically inherits the <code>rootNode</code> object from SimpleApplication. Everything attached to the rootNode is part of the scene graph. The elements of the scene graph are Spatials. Every JME3 application has a rootNode: Your game automatically inherits the <code>rootNode</code> object from SimpleApplication. Everything attached to the rootNode is part of the scene graph. The elements of the scene graph are Spatials.
@ -153,9 +155,9 @@ Every JME3 application has a rootNode: Your game automatically inherits the <cod
<th> Examples: </th><td> A box, a sphere, a player, a building, a piece of terrain, a vehicle, missiles, NPCs, etc… </td><td> The <code>rootNode</code>, a floor node grouping several terrains, a custom vehicle-with-passengers node, a player-with-weapon node, an audio node, etc… </td> <th> Examples: </th><td> A box, a sphere, a player, a building, a piece of terrain, a vehicle, missiles, NPCs, etc… </td><td> The <code>rootNode</code>, a floor node grouping several terrains, a custom vehicle-with-passengers node, a player-with-weapon node, an audio node, etc… </td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT5 TABLE [3923-4416] --> <!-- EDIT5 TABLE [3977-4470] -->
</div> </div>
<!-- EDIT3 SECTION "Understanding the Terminology" [3002-4417] --> <!-- EDIT3 SECTION "Understanding the Terminology" [3049-4471] -->
<h2><a>Understanding the Code</a></h2> <h2><a>Understanding the Code</a></h2>
<div> <div>
@ -169,18 +171,19 @@ What happens in the code snippet? You use the <code>simpleInitApp()</code> metho
<ul> <ul>
<li><div> Create a Box shape with a radius of (1,1,1), that makes the box 2x2x2 world units big.</div> <li><div> Create a Box shape with a radius of (1,1,1), that makes the box 2x2x2 world units big.</div>
</li> </li>
<li><div> Position the box at (1,-1,1).</div> <li><div> Position the box at (1,-1,1) using the move() method. (Don&#039;t change the Vector3f.ZERO unless you want to change the center of rotation)</div>
</li> </li>
<li><div> Wrap the Box shape into a Geometry.</div> <li><div> Wrap the Box shape into a Geometry.</div>
</li> </li>
<li><div> Create a blue material. </div> <li><div> Create a blue material. </div>
</li> </li>
<li><div> Apply the blue material to the Box Geometry. <pre> Box box1 = new Box&#40; new Vector3f&#40;1,-1,1&#41;, 1,1,1&#41;; <li><div> Apply the blue material to the Box Geometry. <pre> Box box1 = new Box&#40; Vector3f.ZERO, 1,1,1&#41;;
Geometry blue = new Geometry&#40;&quot;Box&quot;, box1&#41;; Geometry blue = new Geometry&#40;&quot;Box&quot;, box1&#41;;
Material mat1 = new Material&#40;assetManager, Material mat1 = new Material&#40;assetManager,
&quot;Common/MatDefs/Misc/Unshaded.j3md&quot;&#41;; &quot;Common/MatDefs/Misc/Unshaded.j3md&quot;&#41;;
mat1.setColor&#40;&quot;Color&quot;, ColorRGBA.Blue&#41;; mat1.setColor&#40;&quot;Color&quot;, ColorRGBA.Blue&#41;;
blue.setMaterial&#40;mat1&#41;;</pre> blue.setMaterial&#40;mat1&#41;;
blue.move&#40;1,-1,1&#41;;</pre>
</div> </div>
</li> </li>
</ul> </ul>
@ -195,12 +198,13 @@ What happens in the code snippet? You use the <code>simpleInitApp()</code> metho
</li> </li>
<li><div> Create a red material. </div> <li><div> Create a red material. </div>
</li> </li>
<li><div> Apply the red material to the Box Geometry. <pre> Box box2 = new Box&#40; new Vector3f&#40;1,3,1&#41;, 1,1,1&#41;; <li><div> Apply the red material to the Box Geometry. <pre> Box box2 = new Box&#40; Vector3f.ZERO, 1,1,1&#41;;
Geometry red = new Geometry&#40;&quot;Box&quot;, box2&#41;; Geometry red = new Geometry&#40;&quot;Box&quot;, box2&#41;;
Material mat2 = new Material&#40;assetManager, Material mat2 = new Material&#40;assetManager,
&quot;Common/MatDefs/Misc/Unshaded.j3md&quot;&#41;; &quot;Common/MatDefs/Misc/Unshaded.j3md&quot;&#41;;
mat2.setColor&#40;&quot;Color&quot;, ColorRGBA.Red&#41;; mat2.setColor&#40;&quot;Color&quot;, ColorRGBA.Red&#41;;
red.setMaterial&#40;mat2&#41;;</pre> red.setMaterial&#40;mat2&#41;;
red.move&#40;1,3,1&#41;;</pre>
</div> </div>
</li> </li>
</ul> </ul>
@ -241,7 +245,7 @@ If you run the app with only the code up to here, you see two cubes: A red cube
</ol> </ol>
</div> </div>
<!-- EDIT6 SECTION "Understanding the Code" [4418-6684] --> <!-- EDIT6 SECTION "Understanding the Code" [4472-6875] -->
<h3><a>What is a Pivot Node?</a></h3> <h3><a>What is a Pivot Node?</a></h3>
<div> <div>
@ -260,7 +264,7 @@ You can transform (e.g. rotate) Geometries around their own center, or around a
</ul> </ul>
</div> </div>
<!-- EDIT7 SECTION "What is a Pivot Node?" [6685-8005] --> <!-- EDIT7 SECTION "What is a Pivot Node?" [6876-8196] -->
<h2><a>How do I Populate the Scenegraph?</a></h2> <h2><a>How do I Populate the Scenegraph?</a></h2>
<div> <div>
<div><table> <div><table>
@ -268,8 +272,8 @@ You can transform (e.g. rotate) Geometries around their own center, or around a
<th> Task…? </th><th> Solution! </th> <th> Task…? </th><th> Solution! </th>
</tr> </tr>
<tr> <tr>
<td> Create a Spatial </td><td> Create a shape, wrap it into a Geometry, and give it a Material. For example: <pre>Box mesh = new Box&#40;Vector3f.ZERO, 1, 1, 1&#41;; <td> Create a Spatial </td><td> Create a Mesh shape, wrap it into a Geometry, and give it a Material. For example: <pre>Box mesh = new Box&#40;Vector3f.ZERO, 1, 1, 1&#41;; // a cuboid default mesh
Geometry thing = new Geometry&#40;&quot;thing&quot;, mesh&#41;; Geometry thing = new Geometry&#40;&quot;thing&quot;, mesh&#41;;
Material mat = new Material&#40;assetManager, Material mat = new Material&#40;assetManager,
&quot;Common/MatDefs/Misc/ShowNormals.j3md&quot;&#41;; &quot;Common/MatDefs/Misc/ShowNormals.j3md&quot;&#41;;
thing.setMaterial&#40;mat&#41;;</pre> thing.setMaterial&#40;mat&#41;;</pre>
@ -294,9 +298,9 @@ thing.setMaterial&#40;mat&#41;;</pre>
<td> Specify what should be loaded at the start </td><td> Everything you initialize and attach to the <code>rootNode</code> in the <code>simpleInitApp()</code> method is part of the scene at the start of the game. </td> <td> Specify what should be loaded at the start </td><td> Everything you initialize and attach to the <code>rootNode</code> in the <code>simpleInitApp()</code> method is part of the scene at the start of the game. </td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT9 TABLE [8053-9315] --> <!-- EDIT9 TABLE [8244-9537] -->
</div> </div>
<!-- EDIT8 SECTION "How do I Populate the Scenegraph?" [8006-9316] --> <!-- EDIT8 SECTION "How do I Populate the Scenegraph?" [8197-9538] -->
<h2><a>How do I Transform Spatials?</a></h2> <h2><a>How do I Transform Spatials?</a></h2>
<div> <div>
@ -320,7 +324,7 @@ To move a Spatial <em>to</em> specific coordinates, such as (0,40.2f,-2), use: <
</td><td>+right -left</td><td>+up -down</td><td>+forward -backward</td> </td><td>+right -left</td><td>+up -down</td><td>+forward -backward</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT11 TABLE [9440-9956] --><div><table> <!-- EDIT11 TABLE [9662-10178] --><div><table>
<tr> <tr>
<th> Scaling resizes Spatials </th><th> X-axis </th><th> Y-axis </th><th> Z-axis </th> <th> Scaling resizes Spatials </th><th> X-axis </th><th> Y-axis </th><th> Z-axis </th>
</tr> </tr>
@ -332,25 +336,25 @@ To scale a Spatial 10 times longer, one tenth the height, and keep the same widt
</td><td>length</td><td>height</td><td>width</td> </td><td>length</td><td>height</td><td>width</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT12 TABLE [9958-10447] --><div><table> <!-- EDIT12 TABLE [10180-10669] --><div><table>
<tr> <tr>
<th> Rotation turns Spatials </th><th> X-axis </th><th> Y-axis </th><th> Z-axis </th> <th> Rotation turns Spatials </th><th> X-axis </th><th> Y-axis </th><th> Z-axis </th>
</tr> </tr>
<tr> <tr>
<td>3-D rotation is a bit tricky (<a href="/com/jme3/gde/core/docs/jme2/rotate.html">learn details here</a>). In short: You can rotate around three axes: Pitch, yaw, and roll. You can specify angles in degrees by multiplying the degrees value with <code>FastMath.DEG_TO_RAD</code>. <br/> <td>3-D rotation is a bit tricky (<a href="/com/jme3/gde/core/docs/jme3/rotate.html">learn details here</a>). In short: You can rotate around three axes: Pitch, yaw, and roll. You can specify angles in degrees by multiplying the degrees value with <code>FastMath.DEG_TO_RAD</code>. <br/>
To roll an object 180° around the z axis: <pre>thing.rotate&#40; 0f , 0f , 180*FastMath.DEG_TO_RAD &#41;;</pre> To roll an object 180° around the z axis: <pre>thing.rotate&#40; 0f , 0f , 180*FastMath.DEG_TO_RAD &#41;;</pre>
<p> <p>
Tip: If your game idea calls for a serious amount of rotations, it is worth looking into <a href="/com/jme3/gde/core/docs/jme2/quaternion.html">quaternion</a>s, a data structure that can combine and store rotations efficiently. Tip: If your game idea calls for a serious amount of rotations, it is worth looking into <a href="/com/jme3/gde/core/docs/jme3/quaternion.html">quaternion</a>s, a data structure that can combine and store rotations efficiently.
</p> </p>
<pre>thing.setLocalRotation&#40; <pre>thing.setLocalRotation&#40;
new Quaternion&#40;&#41;.fromAngleAxis&#40;180*FastMath.DEG_TO_RAD, new Vector3f&#40;1,0,0&#41;&#41;&#41;;</pre> new Quaternion&#40;&#41;.fromAngleAxis&#40;180*FastMath.DEG_TO_RAD, new Vector3f&#40;1,0,0&#41;&#41;&#41;;</pre>
</td><td>pitch = nodding your head</td><td>yaw = shaking your head</td><td>roll = cocking your head</td> </td><td>pitch = nodding your head</td><td>yaw = shaking your head</td><td>roll = cocking your head</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT13 TABLE [10449-11230] --> <!-- EDIT13 TABLE [10671-11452] -->
</div> </div>
<!-- EDIT10 SECTION "How do I Transform Spatials?" [9317-11231] --> <!-- EDIT10 SECTION "How do I Transform Spatials?" [9539-11453] -->
<h2><a>How do I Troubleshoot Spatials?</a></h2> <h2><a>How do I Troubleshoot Spatials?</a></h2>
<div> <div>
@ -371,17 +375,18 @@ Is it to tiny or too gigantic to see? <br/>
Is it too far from the camera? (Try <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://jmonkeyengine.org/javadoc/com/jme3/renderer/Camera.html#setFrustumFar%28float%29"><param name="text" value="<html><u>cam.setFrustumFar</u></html>"><param name="textColor" value="blue"></object>(111111f); to see further) </td> Is it too far from the camera? (Try <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://jmonkeyengine.org/javadoc/com/jme3/renderer/Camera.html#setFrustumFar%28float%29"><param name="text" value="<html><u>cam.setFrustumFar</u></html>"><param name="textColor" value="blue"></object>(111111f); to see further) </td>
</tr> </tr>
<tr> <tr>
<td> A Spatial rotates in unexpected ways. </td><td> Did you use radian values, and not degrees? (If you used degrees, multiply them with FastMath.DEG_TO_RAD to convert them to radians)<br/> <td> A Spatial rotates in unexpected ways. </td><td> Did you use radian values, and not degrees? (If you used degrees, multiply them with FastMath.DEG_TO_RAD to convert them to radians) <br/>
Did you rotate around the intended pivot node or something else? <br/> Did you create the Spatial at the origin (Vector.ZERO) before moving it? <br/>
Did you rotate around the intended pivot node or around something else? <br/>
Did you rotate around the right axis? </td> Did you rotate around the right axis? </td>
</tr> </tr>
<tr> <tr>
<td> A Geometry has an unexpected Color or Material. </td><td> Did you reuse a Material from another Geometry and have inadvertently changed its properties? (If so, consider cloning it: mat2 = mat.clone(); ) </td> <td> A Geometry has an unexpected Color or Material. </td><td> Did you reuse a Material from another Geometry and have inadvertently changed its properties? (If so, consider cloning it: mat2 = mat.clone(); ) </td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT15 TABLE [11363-12336] --> <!-- EDIT15 TABLE [11585-12643] -->
</div> </div>
<!-- EDIT14 SECTION "How do I Troubleshoot Spatials?" [11232-12337] --> <!-- EDIT14 SECTION "How do I Troubleshoot Spatials?" [11454-12644] -->
<h2><a>How do I Add Custom Data to Spatials?</a></h2> <h2><a>How do I Add Custom Data to Spatials?</a></h2>
<div> <div>
@ -414,7 +419,7 @@ By using different Strings keys (here the key is <code>pivot id</code>), you can
</p> </p>
</div> </div>
<!-- EDIT16 SECTION "How do I Add Custom Data to Spatials?" [12338-13703] --> <!-- EDIT16 SECTION "How do I Add Custom Data to Spatials?" [12645-14010] -->
<h2><a>Conclusion</a></h2> <h2><a>Conclusion</a></h2>
<div> <div>
@ -432,9 +437,13 @@ Since standard shapes like spheres and boxes get old fast, continue with the nex
<a href="/wiki/doku.php/tag:node?do=showtag&amp;tag=tag%3Anode">node</a>, <a href="/wiki/doku.php/tag:node?do=showtag&amp;tag=tag%3Anode">node</a>,
<a href="/wiki/doku.php/tag:intro?do=showtag&amp;tag=tag%3Aintro">intro</a>, <a href="/wiki/doku.php/tag:intro?do=showtag&amp;tag=tag%3Aintro">intro</a>,
<a href="/wiki/doku.php/tag:documentation?do=showtag&amp;tag=tag%3Adocumentation">documentation</a>, <a href="/wiki/doku.php/tag:documentation?do=showtag&amp;tag=tag%3Adocumentation">documentation</a>,
<a href="/wiki/doku.php/tag:color?do=showtag&amp;tag=tag%3Acolor">color</a> <a href="/wiki/doku.php/tag:color?do=showtag&amp;tag=tag%3Acolor">color</a>,
<a href="/wiki/doku.php/tag:spatial?do=showtag&amp;tag=tag%3Aspatial">spatial</a>,
<a href="/wiki/doku.php/tag:geometry?do=showtag&amp;tag=tag%3Ageometry">geometry</a>,
<a href="/wiki/doku.php/tag:scenegraph?do=showtag&amp;tag=tag%3Ascenegraph">scenegraph</a>,
<a href="/wiki/doku.php/tag:mesh?do=showtag&amp;tag=tag%3Amesh">mesh</a>
</span></div> </span></div>
</div> </div>
<!-- EDIT17 SECTION "Conclusion" [13704-] --> <!-- EDIT17 SECTION "Conclusion" [14011-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:beginner:hello_node?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:beginner:hello_node?do=export_xhtmlbody">view online version</a></em></p>

@ -263,11 +263,11 @@ Before you can start painting, you have to make a few decisions:
</li> </li>
<li><div> You &quot;paint&quot; three texture layers by using three colors: Red, blue and, green. You arbitrarily decide that…</div> <li><div> You &quot;paint&quot; three texture layers by using three colors: Red, blue and, green. You arbitrarily decide that…</div>
<ol> <ol>
<li><div> … everything red will be grass – red goes into layer <code>Tex1</code></div> <li><div> Red is grass – red is layer <code>Tex1</code>, so put the grass texture into Tex1.</div>
</li> </li>
<li><div> … everything green will be dirt – green goes into layer <code>Tex2</code></div> <li><div> Green is dirt – green is layer <code>Tex2</code>, so put the dirt texture into Tex2.</div>
</li> </li>
<li><div> … everything blue will be roads – blue goes into layer <code>Tex3</code></div> <li><div> Blue is roads – blue is layer <code>Tex3</code>, so put the roads texture into Tex3.</div>
</li> </li>
</ol> </ol>
</li> </li>
@ -301,7 +301,7 @@ Now you start painting the texture:
</p> </p>
</div> </div>
<!-- EDIT5 SECTION "What is Texture Splatting?" [7515-10397] --> <!-- EDIT5 SECTION "What is Texture Splatting?" [7515-10434] -->
<h3><a>Looking at the Texturing Code</a></h3> <h3><a>Looking at the Texturing Code</a></h3>
<div> <div>
@ -357,7 +357,7 @@ Use <code>setWrap(WrapMode.Repeat)</code> to make the small texture fill the wid
</p> </p>
</div> </div>
<!-- EDIT6 SECTION "Looking at the Texturing Code" [10398-12536] --> <!-- EDIT6 SECTION "Looking at the Texturing Code" [10435-12573] -->
<h2><a>What is a Terrain?</a></h2> <h2><a>What is a Terrain?</a></h2>
<div> <div>
@ -395,7 +395,7 @@ Create a TerrainQuad with the following arguments:
</ol> </ol>
</div> </div>
<!-- EDIT7 SECTION "What is a Terrain?" [12537-13620] --> <!-- EDIT7 SECTION "What is a Terrain?" [12574-13657] -->
<h3><a>Looking at the Terrain Code</a></h3> <h3><a>Looking at the Terrain Code</a></h3>
<div> <div>
@ -430,7 +430,7 @@ You have created the terrain object.
</p> </p>
</div> </div>
<!-- EDIT8 SECTION "Looking at the Terrain Code" [13621-14383] --> <!-- EDIT8 SECTION "Looking at the Terrain Code" [13658-14420] -->
<h2><a>What is LOD (Level of Detail)?</a></h2> <h2><a>What is LOD (Level of Detail)?</a></h2>
<div> <div>
@ -446,12 +446,12 @@ Close parts of the terrain are rendered in full detail. Terrain parts that are f
</p> </p>
</div> </div>
<!-- EDIT9 SECTION "What is LOD (Level of Detail)?" [14384-14976] --> <!-- EDIT9 SECTION "What is LOD (Level of Detail)?" [14421-15013] -->
<h2><a>Exercises</a></h2> <h2><a>Exercises</a></h2>
<div> <div>
</div> </div>
<!-- EDIT10 SECTION "Exercises" [14977-14999] --> <!-- EDIT10 SECTION "Exercises" [15014-15036] -->
<h3><a>Exercise 1: Texture Layers</a></h3> <h3><a>Exercise 1: Texture Layers</a></h3>
<div> <div>
@ -470,7 +470,7 @@ You see it&#039;s easier to swap layers in the code, than to change the colors i
</p> </p>
</div> </div>
<!-- EDIT11 SECTION "Exercise 1: Texture Layers" [15000-15309] --> <!-- EDIT11 SECTION "Exercise 1: Texture Layers" [15037-15346] -->
<h3><a>Exercise 2: Randomized Terrains</a></h3> <h3><a>Exercise 2: Randomized Terrains</a></h3>
<div> <div>
@ -531,7 +531,7 @@ You see the variety of hilly landscapes that can be generated using this method.
</p> </p>
</div> </div>
<!-- EDIT12 SECTION "Exercise 2: Randomized Terrains" [15310-17323] --> <!-- EDIT12 SECTION "Exercise 2: Randomized Terrains" [15347-17360] -->
<h3><a>Exercise 3: Solid Terrains</a></h3> <h3><a>Exercise 3: Solid Terrains</a></h3>
<div> <div>
@ -541,7 +541,7 @@ Can you combine what you learned here and in <a href="/com/jme3/gde/core/docs/jm
</p> </p>
</div> </div>
<!-- EDIT13 SECTION "Exercise 3: Solid Terrains" [17324-17493] --> <!-- EDIT13 SECTION "Exercise 3: Solid Terrains" [17361-17530] -->
<h2><a>Conclusion</a></h2> <h2><a>Conclusion</a></h2>
<div> <div>
@ -572,5 +572,5 @@ See also:
</span></div> </span></div>
</div> </div>
<!-- EDIT14 SECTION "Conclusion" [17494-] --> <!-- EDIT14 SECTION "Conclusion" [17531-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:beginner:hello_terrain?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:beginner:hello_terrain?do=export_xhtmlbody">view online version</a></em></p>

@ -59,7 +59,7 @@ To export an animated model in Blender make sure the following conditions are me
</p> </p>
<ol> <ol>
<li><div> The animation bas to be a <strong>bone animation</strong></div> <li><div> The animation has to be a <strong>bone animation</strong></div>
</li> </li>
<li><div> Apply Location, Rotation and Scate to the mesh on Blender: On 3D View editor on Blender, select the mesh in Object Mode and go to the 3D View Editor’s header → Object Menu → Apply → Location / Rotation / Scale.</div> <li><div> Apply Location, Rotation and Scate to the mesh on Blender: On 3D View editor on Blender, select the mesh in Object Mode and go to the 3D View Editor’s header → Object Menu → Apply → Location / Rotation / Scale.</div>
</li> </li>

@ -99,11 +99,23 @@ Make sure to only load() models converted to .j3o binary format, not the origina
</div> </div>
<!-- EDIT9 SECTION "Why does the executable crash with Cannot locate resource?" [2661-2991] --> <!-- EDIT9 SECTION "Why does the executable crash with Cannot locate resource?" [2661-2991] -->
<h3><a>What is java.lang.LinkageError: Version mismatch?</a></h3>
<div>
<p>
This rare exception shows a message similar to the following: <code>Exception in thread &quot;LWJGL Renderer Thread&quot; java.lang.LinkageError: Version mismatch: jar version is (number), native library version is (another number)</code>. jME3 needs native libraries (.dll, .jnilib, lib*.so files) to run LWJGL and jBullet. The correct versions of these libraries are included when you install the <acronym title="Software Development Kit">SDK</acronym> or download the binaries. However there are circumstances where jME3 cannot determine which copy of the native library it should use: <br/>
If you install another application that needs a different version of a native library, and this app globally installs its version over jME3&#039;s; or if an old copy of a native library is in your project directory, your home directory, or Java library path, or in the classpath; or if you permanently linked an old copy in your IDE&#039;s settings; then Java assumes you prefer these native libraries over the bundled ones, and your jME3 application ends up running with the wrong version. <br/>
To fix this, search for .dll (Windows), .jnilib (Mac), and .so (Linux) files for jBullet and LWJGL on your harddrive and in your path and IDE settings, and verify they don&#039;t interfere. (If you have other jME versions installed and linked somehow, the outdated natives may also be in a lwjgl.jar or jbullet.jar file!)
</p>
</div>
<!-- EDIT10 SECTION "What is java.lang.LinkageError: Version mismatch?" [2992-4375] -->
<h2><a>I want to load my scene</a></h2> <h2><a>I want to load my scene</a></h2>
<div> <div>
</div> </div>
<!-- EDIT10 SECTION "I want to load my scene" [2992-3027] --> <!-- EDIT11 SECTION "I want to load my scene" [4376-4411] -->
<h3><a>How do I make objects appear / disappear in the 3D scene?</a></h3> <h3><a>How do I make objects appear / disappear in the 3D scene?</a></h3>
<div> <div>
@ -128,7 +140,7 @@ Optionally, you can control whether the engine culls an object always or never.
</p> </p>
</div> </div>
<!-- EDIT11 SECTION "How do I make objects appear / disappear in the 3D scene?" [3028-3937] --> <!-- EDIT12 SECTION "How do I make objects appear / disappear in the 3D scene?" [4412-5321] -->
<h3><a>Why do I get AssetNotFoundException when loading X ?</a></h3> <h3><a>Why do I get AssetNotFoundException when loading X ?</a></h3>
<div> <div>
@ -154,7 +166,7 @@ this.assetManager.registerLocator&#40;&quot;town.zip&quot;, ZipLocator.class&#41
</p> </p>
</div> </div>
<!-- EDIT12 SECTION "Why do I get AssetNotFoundException when loading X ?" [3938-4820] --> <!-- EDIT13 SECTION "Why do I get AssetNotFoundException when loading X ?" [5322-6204] -->
<h3><a>How do I Create 3-D models, textures, sounds?</a></h3> <h3><a>How do I Create 3-D models, textures, sounds?</a></h3>
<div> <div>
@ -162,7 +174,7 @@ this.assetManager.registerLocator&#40;&quot;town.zip&quot;, ZipLocator.class&#41
Follow our best practices for the <a href="/com/jme3/gde/core/docs/jme3/intermediate/multi-media_asset_pipeline.html">multi-media asset pipeline</a>. <br/> Follow our best practices for the <a href="/com/jme3/gde/core/docs/jme3/intermediate/multi-media_asset_pipeline.html">multi-media asset pipeline</a>. <br/>
You create 3-D models in a 3-D mesh editor, for example Blender, and export it in Ogre Mesh <acronym title="Extensible Markup Language">XML</acronym> (animated objects, scenes) or Wavefront OBJ format (static objects, scenes). You create 3-D models in a 3-D mesh editor, for example Blender, and export it in Ogre Mesh <acronym title="Extensible Markup Language">XML</acronym> (animated objects, scenes) or Wavefront OBJ format (static objects, scenes).
You create textures in a graphic editor, for exmaple Gimp, and export them as <acronym title="Portable Network Graphics">PNG</acronym> or <acronym title="Joint Photographics Experts Group">JPG</acronym>. You create textures in a graphic editor, for example Gimp, and export them as <acronym title="Portable Network Graphics">PNG</acronym> or <acronym title="Joint Photographics Experts Group">JPG</acronym>.
You create sounds in an audio editor, for example, Audacity, and export them as WAVE or OGG. You create sounds in an audio editor, for example, Audacity, and export them as WAVE or OGG.
<br/> <br/>
<strong>Learn more:</strong> <a href="/com/jme3/gde/core/docs/jme3/advanced/3d_models.html">3D Models</a>, <a href="/com/jme3/gde/core/docs/jme3/intermediate/multi-media_asset_pipeline.html">Multi-Media Asset Pipeline</a>, <a href="/com/jme3/gde/core/docs/sdk/blender.html">JME3&#039;s blend-to-j3o importer</a>; <br/> <strong>Learn more:</strong> <a href="/com/jme3/gde/core/docs/jme3/advanced/3d_models.html">3D Models</a>, <a href="/com/jme3/gde/core/docs/jme3/intermediate/multi-media_asset_pipeline.html">Multi-Media Asset Pipeline</a>, <a href="/com/jme3/gde/core/docs/sdk/blender.html">JME3&#039;s blend-to-j3o importer</a>; <br/>
@ -170,7 +182,7 @@ You create sounds in an audio editor, for example, Audacity, and export them as
</p> </p>
</div> </div>
<!-- EDIT13 SECTION "How do I Create 3-D models, textures, sounds?" [4821-5818] --> <!-- EDIT14 SECTION "How do I Create 3-D models, textures, sounds?" [6205-7202] -->
<h3><a>How do I load a 3-D model into the scene?</a></h3> <h3><a>How do I load a 3-D model into the scene?</a></h3>
<div> <div>
@ -190,7 +202,7 @@ Spatial ninja = assetManager.loadModel&#40;&quot;Models/Ninja/Ninja.j3o&quot;&#4
</p> </p>
</div> </div>
<!-- EDIT14 SECTION "How do I load a 3-D model into the scene?" [5819-7024] --> <!-- EDIT15 SECTION "How do I load a 3-D model into the scene?" [7203-8408] -->
<h3><a>How do initialize the scene?</a></h3> <h3><a>How do initialize the scene?</a></h3>
<div> <div>
@ -201,12 +213,12 @@ Use the simpleInitApp() method in SimpleApplication (or initApp() in Application
</p> </p>
</div> </div>
<!-- EDIT15 SECTION "How do initialize the scene?" [7025-7357] --> <!-- EDIT16 SECTION "How do initialize the scene?" [8409-8741] -->
<h2><a>I want to transform objects in the scene</a></h2> <h2><a>I want to transform objects in the scene</a></h2>
<div> <div>
</div> </div>
<!-- EDIT16 SECTION "I want to transform objects in the scene" [7358-7410] --> <!-- EDIT17 SECTION "I want to transform objects in the scene" [8742-8794] -->
<h3><a>How do I move or turn or resize a spatial?</a></h3> <h3><a>How do I move or turn or resize a spatial?</a></h3>
<div> <div>
@ -222,7 +234,7 @@ To move or turn or resize a spatial you use transformations. You can concatenate
</p> </p>
</div> </div>
<!-- EDIT17 SECTION "How do I move or turn or resize a spatial?" [7411-7992] --> <!-- EDIT18 SECTION "How do I move or turn or resize a spatial?" [8795-9376] -->
<h3><a>How do I make a spatial move by itself?</a></h3> <h3><a>How do I make a spatial move by itself?</a></h3>
<div> <div>
@ -235,7 +247,7 @@ Change the geometry&#039;s translation (position) live in the update loop using
</p> </p>
</div> </div>
<!-- EDIT18 SECTION "How do I make a spatial move by itself?" [7993-8856] --> <!-- EDIT19 SECTION "How do I make a spatial move by itself?" [9377-10240] -->
<h3><a>How do I access a named sub-mesh in Model?</a></h3> <h3><a>How do I access a named sub-mesh in Model?</a></h3>
<div> <div>
<pre>Geometry result = spatial.getName&#40;&#41;.startsWith&#40;name&#41;;</pre> <pre>Geometry result = spatial.getName&#40;&#41;.startsWith&#40;name&#41;;</pre>
@ -246,7 +258,7 @@ Change the geometry&#039;s translation (position) live in the update loop using
</p> </p>
</div> </div>
<!-- EDIT19 SECTION "How do I access a named sub-mesh in Model?" [8857-9024] --> <!-- EDIT20 SECTION "How do I access a named sub-mesh in Model?" [10241-10408] -->
<h3><a>How do I make procedural or custom shapes?</a></h3> <h3><a>How do I make procedural or custom shapes?</a></h3>
<div> <div>
@ -257,12 +269,12 @@ You can programmatically create com.jme3.scene.Mesh&#039;es.
</p> </p>
</div> </div>
<!-- EDIT20 SECTION "How do I make procedural or custom shapes?" [9025-9185] --> <!-- EDIT21 SECTION "How do I make procedural or custom shapes?" [10409-10569] -->
<h2><a>I want to change the surface of objects in the scene</a></h2> <h2><a>I want to change the surface of objects in the scene</a></h2>
<div> <div>
</div> </div>
<!-- EDIT21 SECTION "I want to change the surface of objects in the scene" [9186-9250] --> <!-- EDIT22 SECTION "I want to change the surface of objects in the scene" [10570-10634] -->
<h3><a>Why is my UV wrapping / texture appearance all wrong?</a></h3> <h3><a>Why is my UV wrapping / texture appearance all wrong?</a></h3>
<div> <div>
@ -280,7 +292,7 @@ You can set the boolean value in the constructor of TextureKey to flipped or not
<pre> material.setTexture&#40;&quot;ColorMap&quot;, this.assetManager.loadTexture&#40;new TextureKey&#40;&quot;myTexture.jpg&quot;, false&#41;&#41;&#41;;</pre> <pre> material.setTexture&#40;&quot;ColorMap&quot;, this.assetManager.loadTexture&#40;new TextureKey&#40;&quot;myTexture.jpg&quot;, false&#41;&#41;&#41;;</pre>
</div> </div>
<!-- EDIT22 SECTION "Why is my UV wrapping / texture appearance all wrong?" [9251-9800] --> <!-- EDIT23 SECTION "Why is my UV wrapping / texture appearance all wrong?" [10635-11184] -->
<h3><a>How do I scale, mirror, or wrap a texture?</a></h3> <h3><a>How do I scale, mirror, or wrap a texture?</a></h3>
<div> <div>
@ -298,7 +310,7 @@ You can choose among various <code>com.jme3.texture.Texture.WrapMode</code>s for
<pre>material.getTextureParam&#40;&quot;DiffuseMap&quot;&#41;.getTextureValue&#40;&#41;.setWrap&#40;WrapMode.Repeat&#41;;</pre> <pre>material.getTextureParam&#40;&quot;DiffuseMap&quot;&#41;.getTextureValue&#40;&#41;.setWrap&#40;WrapMode.Repeat&#41;;</pre>
</div> </div>
<!-- EDIT23 SECTION "How do I scale, mirror, or wrap a texture?" [9801-10342] --> <!-- EDIT24 SECTION "How do I scale, mirror, or wrap a texture?" [11185-11726] -->
<h3><a>How do I change color or shininess of an material?</a></h3> <h3><a>How do I change color or shininess of an material?</a></h3>
<div> <div>
@ -311,7 +323,7 @@ Use the AssetManager to load Materials, and change material settings.
</p> </p>
</div> </div>
<!-- EDIT24 SECTION "How do I change color or shininess of an material?" [10343-10930] --> <!-- EDIT25 SECTION "How do I change color or shininess of an material?" [11727-12314] -->
<h3><a>How do I make a surface wood, stone, metal, etc?</a></h3> <h3><a>How do I make a surface wood, stone, metal, etc?</a></h3>
<div> <div>
@ -324,7 +336,7 @@ Create Textures as image files. Use the AssetManager to load a Material and use
</p> </p>
</div> </div>
<!-- EDIT25 SECTION "How do I make a surface wood, stone, metal, etc?" [10931-11704] --> <!-- EDIT26 SECTION "How do I make a surface wood, stone, metal, etc?" [12315-13088] -->
<h3><a>Why are materials too bright, too dark, or flickering?</a></h3> <h3><a>Why are materials too bright, too dark, or flickering?</a></h3>
<div> <div>
@ -333,7 +345,7 @@ If you use a lit material (based on Lighting.j3md) then you must attach a light
</p> </p>
</div> </div>
<!-- EDIT26 SECTION "Why are materials too bright, too dark, or flickering?" [11705-12518] --> <!-- EDIT27 SECTION "Why are materials too bright, too dark, or flickering?" [13089-13902] -->
<h3><a>How do I make geometries cast a shadow?</a></h3> <h3><a>How do I make geometries cast a shadow?</a></h3>
<div> <div>
@ -346,7 +358,7 @@ Use com.jme3.shadow.BasicShadowRenderer together with com.jme3.light.Directional
</p> </p>
</div> </div>
<!-- EDIT27 SECTION "How do I make geometries cast a shadow?" [12519-13027] --> <!-- EDIT28 SECTION "How do I make geometries cast a shadow?" [13903-14411] -->
<h3><a>How do I make materials transparent?</a></h3> <h3><a>How do I make materials transparent?</a></h3>
<div> <div>
@ -362,7 +374,7 @@ Assign a texture with an alpha channel to a Material and set the Material&#039;s
</p> </p>
</div> </div>
<!-- EDIT28 SECTION "How do I make materials transparent?" [13028-13464] --> <!-- EDIT29 SECTION "How do I make materials transparent?" [14412-14848] -->
<h3><a>How do I force or disable backface culling?</a></h3> <h3><a>How do I force or disable backface culling?</a></h3>
<div> <div>
@ -373,7 +385,7 @@ You can switch the com.jme3.material.RenderState.FaceCullMode to Back, Front, Fr
<pre>material.getAdditionalRenderState&#40;&#41;.setFaceCullMode&#40;FaceCullMode.FrontAndBack&#41;;</pre> <pre>material.getAdditionalRenderState&#40;&#41;.setFaceCullMode&#40;FaceCullMode.FrontAndBack&#41;;</pre>
</div> </div>
<!-- EDIT29 SECTION "How do I force or disable backface culling?" [13465-13881] --> <!-- EDIT30 SECTION "How do I force or disable backface culling?" [14849-15265] -->
<h3><a>Can I draw only an outline of the scene?</a></h3> <h3><a>Can I draw only an outline of the scene?</a></h3>
<div> <div>
@ -389,12 +401,12 @@ Create a material and switch its renders state to wireframe.
</p> </p>
</div> </div>
<!-- EDIT30 SECTION "Can I draw only an outline of the scene?" [13882-14113] --> <!-- EDIT31 SECTION "Can I draw only an outline of the scene?" [15266-15497] -->
<h2><a>I want to control the camera</a></h2> <h2><a>I want to control the camera</a></h2>
<div> <div>
</div> </div>
<!-- EDIT31 SECTION "I want to control the camera" [14114-14154] --> <!-- EDIT32 SECTION "I want to control the camera" [15498-15538] -->
<h3><a>How do I switch between third-person and first-person view ?</a></h3> <h3><a>How do I switch between third-person and first-person view ?</a></h3>
<div> <div>
@ -416,18 +428,18 @@ chaseCam = new ChaseCamera&#40;cam, spatial, inputManager&#41;;</pre>
</ul> </ul>
</div> </div>
<!-- EDIT32 SECTION "How do I switch between third-person and first-person view ?" [14155-15211] --> <!-- EDIT33 SECTION "How do I switch between third-person and first-person view ?" [15539-16595] -->
<h3><a>How do I increase camera speed?</a></h3> <h3><a>How do I increase camera speed?</a></h3>
<div> <div>
<pre>flyCam.setMoveSpeed&#40;50f&#41;;</pre> <pre>flyCam.setMoveSpeed&#40;50f&#41;;</pre>
</div> </div>
<!-- EDIT33 SECTION "How do I increase camera speed?" [15212-15298] --> <!-- EDIT34 SECTION "How do I increase camera speed?" [16596-16682] -->
<h2><a>Actions, Interactions, Physics</a></h2> <h2><a>Actions, Interactions, Physics</a></h2>
<div> <div>
</div> </div>
<!-- EDIT34 SECTION "Actions, Interactions, Physics" [15299-15341] --> <!-- EDIT35 SECTION "Actions, Interactions, Physics" [16683-16725] -->
<h3><a>How do I implement game logic / game mechanics?</a></h3> <h3><a>How do I implement game logic / game mechanics?</a></h3>
<div> <div>
@ -438,7 +450,7 @@ Use Controls to define the behaviour of types of Spatials. Use Application State
</p> </p>
</div> </div>
<!-- EDIT35 SECTION "How do I implement game logic / game mechanics?" [15342-15903] --> <!-- EDIT36 SECTION "How do I implement game logic / game mechanics?" [16726-17287] -->
<h3><a>How do I let players interact via keyboard?</a></h3> <h3><a>How do I let players interact via keyboard?</a></h3>
<div> <div>
@ -449,7 +461,7 @@ Use com.jme3.input.KeyInput and a Input Listener.
</p> </p>
</div> </div>
<!-- EDIT36 SECTION "How do I let players interact via keyboard?" [15904-16111] --> <!-- EDIT37 SECTION "How do I let players interact via keyboard?" [17288-17495] -->
<h3><a>How do I let players interact by clicking?</a></h3> <h3><a>How do I let players interact by clicking?</a></h3>
<div> <div>
@ -462,7 +474,7 @@ Players typically click the mouse to pick up objects, to open doors, to shoot a
</p> </p>
</div> </div>
<!-- EDIT37 SECTION "How do I let players interact by clicking?" [16112-16936] --> <!-- EDIT38 SECTION "How do I let players interact by clicking?" [17496-18320] -->
<h3><a>How do I animate characters?</a></h3> <h3><a>How do I animate characters?</a></h3>
<div> <div>
@ -475,7 +487,7 @@ Create an animated OgreMesh model with bones in a 3-D mesh editor (e.g. Blender)
</p> </p>
</div> </div>
<!-- EDIT38 SECTION "How do I animate characters?" [16937-17408] --> <!-- EDIT39 SECTION "How do I animate characters?" [18321-18792] -->
<h3><a>How do I keep players from falling through walls and floors?</a></h3> <h3><a>How do I keep players from falling through walls and floors?</a></h3>
<div> <div>
@ -486,7 +498,7 @@ Use collision detection. The most common solution is to use jme&#039;s physics i
</p> </p>
</div> </div>
<!-- EDIT39 SECTION "How do I keep players from falling through walls and floors?" [17409-17771] --> <!-- EDIT40 SECTION "How do I keep players from falling through walls and floors?" [18793-19155] -->
<h3><a>How do I make balls/wheels/etc bounce and roll?</a></h3> <h3><a>How do I make balls/wheels/etc bounce and roll?</a></h3>
<div> <div>
@ -499,7 +511,7 @@ Add physics controls to Spatials and give them spherical or cylindrical bounding
</p> </p>
</div> </div>
<!-- EDIT40 SECTION "How do I make balls/wheels/etc bounce and roll?" [17772-18369] --> <!-- EDIT41 SECTION "How do I make balls/wheels/etc bounce and roll?" [19156-19753] -->
<h3><a>How do I debug weird Physics behaviour?</a></h3> <h3><a>How do I debug weird Physics behaviour?</a></h3>
<div> <div>
@ -509,7 +521,7 @@ Maybe your collision shapes overlap – or they are not where you think they are
<pre>bulletAppState.getPhysicsSpace&#40;&#41;.enableDebug&#40;assetManager&#41;;</pre> <pre>bulletAppState.getPhysicsSpace&#40;&#41;.enableDebug&#40;assetManager&#41;;</pre>
</div> </div>
<!-- EDIT41 SECTION "How do I debug weird Physics behaviour?" [18370-18683] --> <!-- EDIT42 SECTION "How do I debug weird Physics behaviour?" [19754-20067] -->
<h3><a>How do I make a walking character?</a></h3> <h3><a>How do I make a walking character?</a></h3>
<div> <div>
@ -522,7 +534,7 @@ Code samples: <object classid="java:org.netbeans.modules.javahelp.BrowserDisplay
</p> </p>
</div> </div>
<!-- EDIT42 SECTION "How do I make a walking character?" [18684-19242] --> <!-- EDIT43 SECTION "How do I make a walking character?" [20068-20626] -->
<h3><a>How do I steer vehicles?</a></h3> <h3><a>How do I steer vehicles?</a></h3>
<div> <div>
@ -535,7 +547,7 @@ Code samples: <object classid="java:org.netbeans.modules.javahelp.BrowserDisplay
</p> </p>
</div> </div>
<!-- EDIT43 SECTION "How do I steer vehicles?" [19243-19610] --> <!-- EDIT44 SECTION "How do I steer vehicles?" [20627-20994] -->
<h3><a>Can objects swing like a pendulums, chains, ropebridges?</a></h3> <h3><a>Can objects swing like a pendulums, chains, ropebridges?</a></h3>
<div> <div>
@ -547,12 +559,12 @@ Use a PhysicsControl&#039;s hinges and joints.
</p> </p>
</div> </div>
<!-- EDIT44 SECTION "Can objects swing like a pendulums, chains, ropebridges?" [19611-20011] --> <!-- EDIT45 SECTION "Can objects swing like a pendulums, chains, ropebridges?" [20995-21395] -->
<h2><a>Default GUI Display</a></h2> <h2><a>Default GUI Display</a></h2>
<div> <div>
</div> </div>
<!-- EDIT45 SECTION "Default GUI Display" [20012-20043] --> <!-- EDIT46 SECTION "Default GUI Display" [21396-21427] -->
<h3><a>What are these FPS/Objects/Vertices/Triangles statistics?</a></h3> <h3><a>What are these FPS/Objects/Vertices/Triangles statistics?</a></h3>
<div> <div>
@ -564,7 +576,7 @@ At the bottom left of every default SimpleGame, you see the <a href="/com/jme3/g
</p> </p>
</div> </div>
<!-- EDIT46 SECTION "What are these FPS/Objects/Vertices/Triangles statistics?" [20044-20571] --> <!-- EDIT47 SECTION "What are these FPS/Objects/Vertices/Triangles statistics?" [21428-21955] -->
<h3><a>How do I get rid of the FPS/Objects statistics?</a></h3> <h3><a>How do I get rid of the FPS/Objects statistics?</a></h3>
<div> <div>
@ -583,7 +595,7 @@ setDisplayStatView(false); // to hide the statistics </pre>
</p> </p>
</div> </div>
<!-- EDIT47 SECTION "How do I get rid of the FPS/Objects statistics?" [20572-20836] --> <!-- EDIT48 SECTION "How do I get rid of the FPS/Objects statistics?" [21956-22220] -->
<h3><a>How do I display score, health, mini-maps, status icons?</a></h3> <h3><a>How do I display score, health, mini-maps, status icons?</a></h3>
<div> <div>
@ -596,7 +608,7 @@ Attach text and pictures to the orthogonal <code>guiNode</code> to create a head
</p> </p>
</div> </div>
<!-- EDIT48 SECTION "How do I display score, health, mini-maps, status icons?" [20837-21429] --> <!-- EDIT49 SECTION "How do I display score, health, mini-maps, status icons?" [22221-22813] -->
<h3><a>How do I display buttons and UI controls?</a></h3> <h3><a>How do I display buttons and UI controls?</a></h3>
<div> <div>
@ -609,7 +621,7 @@ Sample Code: <object classid="java:org.netbeans.modules.javahelp.BrowserDisplaye
</p> </p>
</div> </div>
<!-- EDIT49 SECTION "How do I display buttons and UI controls?" [21430-21874] --> <!-- EDIT50 SECTION "How do I display buttons and UI controls?" [22814-23258] -->
<h3><a>How do i display a loading screen?</a></h3> <h3><a>How do i display a loading screen?</a></h3>
<div> <div>
@ -620,12 +632,12 @@ Instead of having a frozen frame while your games loads, you can have a loading
</p> </p>
</div> </div>
<!-- EDIT50 SECTION "How do i display a loading screen?" [21875-22091] --> <!-- EDIT51 SECTION "How do i display a loading screen?" [23259-23475] -->
<h2><a>Nifty GUI</a></h2> <h2><a>Nifty GUI</a></h2>
<div> <div>
</div> </div>
<!-- EDIT51 SECTION "Nifty GUI" [22092-22113] --> <!-- EDIT52 SECTION "Nifty GUI" [23476-23497] -->
<h3><a>I get NoSuchElementException when adding controls (buttons etc)!</a></h3> <h3><a>I get NoSuchElementException when adding controls (buttons etc)!</a></h3>
<div> <div>
@ -636,7 +648,7 @@ Verify that you include a controls definition file link in your <acronym title="
<pre><span>&lt;useControls filename=&quot;nifty-default-controls.xml&quot;/&gt;</span></pre> <pre><span>&lt;useControls filename=&quot;nifty-default-controls.xml&quot;/&gt;</span></pre>
</div> </div>
<!-- EDIT52 SECTION "I get NoSuchElementException when adding controls (buttons etc)!" [22114-22349] --> <!-- EDIT53 SECTION "I get NoSuchElementException when adding controls (buttons etc)!" [23498-23733] -->
<h3><a>Where can I find example code of Nifty GUI&#039;s XML and Java classes?</a></h3> <h3><a>Where can I find example code of Nifty GUI&#039;s XML and Java classes?</a></h3>
<div> <div>
@ -645,7 +657,7 @@ Verify that you include a controls definition file link in your <acronym title="
</p> </p>
</div> </div>
<!-- EDIT53 SECTION "Where can I find example code of Nifty GUI's XML and Java classes?" [22350-22512] --> <!-- EDIT54 SECTION "Where can I find example code of Nifty GUI's XML and Java classes?" [23734-23896] -->
<h3><a>Is there Java Doc for Nifty GUI?</a></h3> <h3><a>Is there Java Doc for Nifty GUI?</a></h3>
<div> <div>
@ -654,12 +666,12 @@ Verify that you include a controls definition file link in your <acronym title="
</p> </p>
</div> </div>
<!-- EDIT54 SECTION "Is there Java Doc for Nifty GUI?" [22513-22638] --> <!-- EDIT55 SECTION "Is there Java Doc for Nifty GUI?" [23897-24022] -->
<h2><a>I want to create an environment with sounds, effects, and landscapes</a></h2> <h2><a>I want to create an environment with sounds, effects, and landscapes</a></h2>
<div> <div>
</div> </div>
<!-- EDIT55 SECTION "I want to create an environment with sounds, effects, and landscapes" [22639-22719] --> <!-- EDIT56 SECTION "I want to create an environment with sounds, effects, and landscapes" [24023-24103] -->
<h3><a>How do I play sounds and noises?</a></h3> <h3><a>How do I play sounds and noises?</a></h3>
<div> <div>
@ -672,7 +684,7 @@ Use AudioRenderer, Listener, and AudioNode from com.jme3.audio.*.
</p> </p>
</div> </div>
<!-- EDIT56 SECTION "How do I play sounds and noises?" [22720-23023] --> <!-- EDIT57 SECTION "How do I play sounds and noises?" [24104-24407] -->
<h3><a>How do I make fire, smoke, explosions, swarms, magic spells?</a></h3> <h3><a>How do I make fire, smoke, explosions, swarms, magic spells?</a></h3>
<div> <div>
@ -685,7 +697,7 @@ For swarm like effects you use particle emitters.
</p> </p>
</div> </div>
<!-- EDIT57 SECTION "How do I make fire, smoke, explosions, swarms, magic spells?" [23024-23679] --> <!-- EDIT58 SECTION "How do I make fire, smoke, explosions, swarms, magic spells?" [24408-25063] -->
<h3><a>How do I make water, waves, reflections?</a></h3> <h3><a>How do I make water, waves, reflections?</a></h3>
<div> <div>
@ -698,7 +710,7 @@ Use a special post-processor renderer from com.jme3.water.*.
</p> </p>
</div> </div>
<!-- EDIT58 SECTION "How do I make water, waves, reflections?" [23680-24440] --> <!-- EDIT59 SECTION "How do I make water, waves, reflections?" [25064-25824] -->
<h3><a>How do I make fog, bloom, blur, light scrattering?</a></h3> <h3><a>How do I make fog, bloom, blur, light scrattering?</a></h3>
<div> <div>
@ -709,7 +721,7 @@ Use special post-processor renderers from com.jme3.post.*.
</p> </p>
</div> </div>
<!-- EDIT59 SECTION "How do I make fog, bloom, blur, light scrattering?" [24441-24616] --> <!-- EDIT60 SECTION "How do I make fog, bloom, blur, light scrattering?" [25825-26000] -->
<h3><a>How do I generate a terrain?</a></h3> <h3><a>How do I generate a terrain?</a></h3>
<div> <div>
@ -722,7 +734,7 @@ Use com.jme3.terrain.*. The JMonkeyEngine also provides you with a Terrain Edito
</p> </p>
</div> </div>
<!-- EDIT60 SECTION "How do I generate a terrain?" [24617-25000] --> <!-- EDIT61 SECTION "How do I generate a terrain?" [26001-26384] -->
<h3><a>How do I make a sky?</a></h3> <h3><a>How do I make a sky?</a></h3>
<div> <div>
@ -740,12 +752,12 @@ skyGeo.setQueueBucket&#40;Bucket.Sky&#41; </pre>
</p> </p>
</div> </div>
<!-- EDIT61 SECTION "How do I make a sky?" [25001-25380] --> <!-- EDIT62 SECTION "How do I make a sky?" [26385-26764] -->
<h2><a>I want to access to back-end properties</a></h2> <h2><a>I want to access to back-end properties</a></h2>
<div> <div>
</div> </div>
<!-- EDIT62 SECTION "I want to access to back-end properties" [25381-25432] --> <!-- EDIT63 SECTION "I want to access to back-end properties" [26765-26816] -->
<h3><a>How do I read out graphic card capabilities?</a></h3> <h3><a>How do I read out graphic card capabilities?</a></h3>
<div> <div>
@ -802,7 +814,7 @@ FloatColorBuffer, FloatDepthBuffer, PackedFloatTexture, SharedExponentTexture, P
TextureCompressionLATC, NonPowerOfTwoTextures, MeshInstancing]</pre> TextureCompressionLATC, NonPowerOfTwoTextures, MeshInstancing]</pre>
</div> </div>
<!-- EDIT63 SECTION "How do I read out graphic card capabilities?" [25433-27513] --> <!-- EDIT64 SECTION "How do I read out graphic card capabilities?" [26817-28897] -->
<h3><a>How do I optimize the heck out of the Scene Graph?</a></h3> <h3><a>How do I optimize the heck out of the Scene Graph?</a></h3>
<div> <div>
@ -819,7 +831,7 @@ Batching means that all Geometries with the same Material are combined into one
</p> </p>
</div> </div>
<!-- EDIT64 SECTION "How do I optimize the heck out of the Scene Graph?" [27514-27983] --> <!-- EDIT65 SECTION "How do I optimize the heck out of the Scene Graph?" [28898-29367] -->
<h3><a>How do I prevent users from unzipping my JAR?</a></h3> <h3><a>How do I prevent users from unzipping my JAR?</a></h3>
<div> <div>
@ -829,12 +841,12 @@ Add an <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><pa
</p> </p>
</div> </div>
<!-- EDIT65 SECTION "How do I prevent users from unzipping my JAR?" [27984-28233] --> <!-- EDIT66 SECTION "How do I prevent users from unzipping my JAR?" [29368-29617] -->
<h2><a>I want to do maths</a></h2> <h2><a>I want to do maths</a></h2>
<div> <div>
</div> </div>
<!-- EDIT66 SECTION "I want to do maths" [28234-28264] --> <!-- EDIT67 SECTION "I want to do maths" [29618-29648] -->
<h3><a>What does addLocal() / multLocal() etc mean?</a></h3> <h3><a>What does addLocal() / multLocal() etc mean?</a></h3>
<div> <div>
@ -887,7 +899,7 @@ Many maths functions (mult(), add(), subtract(), etc) come as local and a non-lo
</ol> </ol>
</div> </div>
<!-- EDIT67 SECTION "What does addLocal() / multLocal() etc mean?" [28265-29626] --> <!-- EDIT68 SECTION "What does addLocal() / multLocal() etc mean?" [29649-31010] -->
<h3><a>What is the difference between World and Local coordinates?</a></h3> <h3><a>What is the difference between World and Local coordinates?</a></h3>
<div> <div>
@ -897,7 +909,7 @@ World coordinates of a Spatial are its absolute coordinates in the 3D scene (thi
</p> </p>
</div> </div>
<!-- EDIT68 SECTION "What is the difference between World and Local coordinates?" [29627-29936] --> <!-- EDIT69 SECTION "What is the difference between World and Local coordinates?" [31011-31320] -->
<h3><a>How do I convert Degrees to Radians?</a></h3> <h3><a>How do I convert Degrees to Radians?</a></h3>
<div> <div>
@ -911,5 +923,5 @@ Multiply degree value by FastMath.DEG_TO_RAD to convert it to radians.
</span></div> </span></div>
</div> </div>
<!-- EDIT69 SECTION "How do I convert Degrees to Radians?" [29937-] --> <!-- EDIT70 SECTION "How do I convert Degrees to Radians?" [31321-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:faq?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:faq?do=export_xhtmlbody">view online version</a></em></p>

@ -35,7 +35,7 @@ As a quick overview, answer yourself the following questions:
<ul> <ul>
<li><div> Sum up your game idea in one sentence. If you can&#039;t, it&#039;s too complicated.</div> <li><div> Sum up your game idea in one sentence. If you can&#039;t, it&#039;s too complicated.</div>
</li> </li>
<li><div> Who&#039;s the target group? Why would they choose your game over the million others that exist?</div> <li><div> Who&#039;s the target group? Are you making it for yourself or are you trying to attract the masses?</div>
</li> </li>
</ul> </ul>
</li> </li>
@ -51,7 +51,7 @@ As a quick overview, answer yourself the following questions:
</li> </li>
<li><div> Gameplay</div> <li><div> Gameplay</div>
<ul> <ul>
<li><div> What is the start state, what is the end state?</div> <li><div> What is the start state, what is the end state (if any)?</div>
</li> </li>
<li><div> What resources does the player manage? How are resources gained, transformed, spent? <br/> <li><div> What resources does the player manage? How are resources gained, transformed, spent? <br/>
E.g. speed, gold, health, &quot;points&quot;.</div> E.g. speed, gold, health, &quot;points&quot;.</div>
@ -82,7 +82,7 @@ E.g. models, terrains; materials, textures; noises, music, voices; video, cutsce
</ul> </ul>
</div> </div>
<!-- EDIT3 SECTION "Requirements Gathering" [635-2000] --> <!-- EDIT3 SECTION "Requirements Gathering" [635-2013] -->
<h3><a>Planning Development Milestones</a></h3> <h3><a>Planning Development Milestones</a></h3>
<div> <div>
@ -144,7 +144,7 @@ How you name or number these stages is fully up to your team. Development teams
</p> </p>
</div> </div>
<!-- EDIT4 SECTION "Planning Development Milestones" [2001-3785] --> <!-- EDIT4 SECTION "Planning Development Milestones" [2014-3798] -->
<h3><a>Use File Version Control</a></h3> <h3><a>Use File Version Control</a></h3>
<div> <div>
@ -163,7 +163,7 @@ If you don&#039;t know which to choose, Subversion is a good choice for starters
</ul> </ul>
</div> </div>
<!-- EDIT5 SECTION "Use File Version Control" [3786-4618] --> <!-- EDIT5 SECTION "Use File Version Control" [3799-4631] -->
<h2><a>Multi-Media Asset Pipeline</a></h2> <h2><a>Multi-Media Asset Pipeline</a></h2>
<div> <div>
<div><table> <div><table>
@ -189,14 +189,14 @@ If you don&#039;t know which to choose, Subversion is a good choice for starters
<td> Convert Models to j3o format. Move j3o files into <code>assets/Models</code>. </td><td>Don&#039;t reference Blender/Ogre/OBJ files in your load() code, because these unoptimized files are not packaged into the JAR.</td> <td> Convert Models to j3o format. Move j3o files into <code>assets/Models</code>. </td><td>Don&#039;t reference Blender/Ogre/OBJ files in your load() code, because these unoptimized files are not packaged into the JAR.</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT7 TABLE [4659-5545] --> <!-- EDIT7 TABLE [4672-5558] -->
<p> <p>
Learn details about the <a href="/com/jme3/gde/core/docs/jme3/intermediate/multi-media_asset_pipeline.html">Multi-Media Asset Pipeline</a> here. Learn details about the <a href="/com/jme3/gde/core/docs/jme3/intermediate/multi-media_asset_pipeline.html">Multi-Media Asset Pipeline</a> here.
</p> </p>
</div> </div>
<!-- EDIT6 SECTION "Multi-Media Asset Pipeline" [4619-5628] --> <!-- EDIT6 SECTION "Multi-Media Asset Pipeline" [4632-5641] -->
<h2><a>Development Phase</a></h2> <h2><a>Development Phase</a></h2>
<div> <div>
@ -208,7 +208,7 @@ Even for large experienced game producers, the creation of such a complex game i
</p> </p>
</div> </div>
<!-- EDIT8 SECTION "Development Phase" [5629-6278] --> <!-- EDIT8 SECTION "Development Phase" [5642-6291] -->
<h3><a>Extend SimpleApplication</a></h3> <h3><a>Extend SimpleApplication</a></h3>
<div> <div>
@ -227,7 +227,7 @@ For your future game releases, you will want to rely on your own base framework:
</p> </p>
</div> </div>
<!-- EDIT9 SECTION "Extend SimpleApplication" [6279-7392] --> <!-- EDIT9 SECTION "Extend SimpleApplication" [6292-7405] -->
<h3><a>Where to Start?</a></h3> <h3><a>Where to Start?</a></h3>
<div> <div>
@ -255,7 +255,7 @@ You have a list of features that you want in game, but which one do you implemen
</p> </p>
</div> </div>
<!-- EDIT10 SECTION "Where to Start?" [7393-8760] --> <!-- EDIT10 SECTION "Where to Start?" [7406-8773] -->
<h3><a>The Smart Way to Add Custom Methods and Fields</a></h3> <h3><a>The Smart Way to Add Custom Methods and Fields</a></h3>
<div> <div>
@ -279,7 +279,7 @@ Game entities (<code>Nodes</code> and <code>Geometry</code>s) often carry custom
</ul> </ul>
</div> </div>
<!-- EDIT11 SECTION "The Smart Way to Add Custom Methods and Fields" [8761-10109] --> <!-- EDIT11 SECTION "The Smart Way to Add Custom Methods and Fields" [8774-10122] -->
<h3><a>The Smart Way to Access Game Features</a></h3> <h3><a>The Smart Way to Access Game Features</a></h3>
<div> <div>
@ -297,7 +297,7 @@ An AppState has access to all game features in the SimpleApplication via the <co
this.app.getRootNode&#40;&#41;.attachChild&#40; sky &#41;;</pre> this.app.getRootNode&#40;&#41;.attachChild&#40; sky &#41;;</pre>
</div> </div>
<!-- EDIT12 SECTION "The Smart Way to Access Game Features" [10110-10947] --> <!-- EDIT12 SECTION "The Smart Way to Access Game Features" [10123-10960] -->
<h3><a>The Smart Way to Implement Game Logic</a></h3> <h3><a>The Smart Way to Implement Game Logic</a></h3>
<div> <div>
@ -359,7 +359,7 @@ Read all about <a href="/com/jme3/gde/core/docs/jme3/advanced/custom_controls.ht
</p> </p>
</div> </div>
<!-- EDIT13 SECTION "The Smart Way to Implement Game Logic" [10948-13750] --> <!-- EDIT13 SECTION "The Smart Way to Implement Game Logic" [10961-13763] -->
<h3><a>Optimize Application Performance</a></h3> <h3><a>Optimize Application Performance</a></h3>
<div> <div>
<ul> <ul>
@ -372,7 +372,7 @@ Read all about <a href="/com/jme3/gde/core/docs/jme3/advanced/custom_controls.ht
</ul> </ul>
</div> </div>
<!-- EDIT14 SECTION "Optimize Application Performance" [13751-14474] --> <!-- EDIT14 SECTION "Optimize Application Performance" [13764-14487] -->
<h3><a>Don&#039;t Mess With Geometric State</a></h3> <h3><a>Don&#039;t Mess With Geometric State</a></h3>
<div> <div>
@ -390,7 +390,7 @@ Read all about <a href="/com/jme3/gde/core/docs/jme3/advanced/custom_controls.ht
</ul> </ul>
</div> </div>
<!-- EDIT15 SECTION "Don't Mess With Geometric State" [14475-14964] --> <!-- EDIT15 SECTION "Don't Mess With Geometric State" [14488-14977] -->
<h3><a>Maintain Internal Documentation</a></h3> <h3><a>Maintain Internal Documentation</a></h3>
<div> <div>
@ -413,7 +413,7 @@ Treat javadoc as messages to your future self. &quot;genNextVal() generates the
</p> </p>
</div> </div>
<!-- EDIT16 SECTION "Maintain Internal Documentation" [14965-15701] --> <!-- EDIT16 SECTION "Maintain Internal Documentation" [14978-15714] -->
<h2><a>Debugging and Test Phase</a></h2> <h2><a>Debugging and Test Phase</a></h2>
<div> <div>
@ -439,12 +439,12 @@ Treat javadoc as messages to your future self. &quot;genNextVal() generates the
</p> </p>
</div> </div>
<!-- EDIT17 SECTION "Debugging and Test Phase" [15702-18318] --> <!-- EDIT17 SECTION "Debugging and Test Phase" [15715-18331] -->
<h2><a>Release Phase</a></h2> <h2><a>Release Phase</a></h2>
<div> <div>
</div> </div>
<!-- EDIT18 SECTION "Release Phase" [18319-18345] --> <!-- EDIT18 SECTION "Release Phase" [18332-18358] -->
<h3><a>Pre-Release To-Do List</a></h3> <h3><a>Pre-Release To-Do List</a></h3>
<div> <div>
<ul> <ul>
@ -469,7 +469,7 @@ Treat javadoc as messages to your future self. &quot;genNextVal() generates the
</ul> </ul>
</div> </div>
<!-- EDIT19 SECTION "Pre-Release To-Do List" [18346-19297] --> <!-- EDIT19 SECTION "Pre-Release To-Do List" [18359-19310] -->
<h3><a>Distributing the Executables</a></h3> <h3><a>Distributing the Executables</a></h3>
<div> <div>
@ -507,7 +507,7 @@ Decide whether you want to release your game as WebStart, desktop JAR, mobile AP
(.APK)</td><td>Game runs on Android devices.</td><td>Android devices do not support post-procesor effects.</td> (.APK)</td><td>Game runs on Android devices.</td><td>Android devices do not support post-procesor effects.</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT21 TABLE [19751-20971] --> <!-- EDIT21 TABLE [19764-20984] -->
<p> <p>
Which ever method you choose, a Java-Application works on the main operating systems: Windows, Mac <acronym title="Operating System">OS</acronym>, Linux, Android. Which ever method you choose, a Java-Application works on the main operating systems: Windows, Mac <acronym title="Operating System">OS</acronym>, Linux, Android.
@ -519,5 +519,5 @@ The distribution appears in a newly generated <code>dist</code> directory inside
</p> </p>
</div> </div>
<!-- EDIT20 SECTION "Distributing the Executables" [19298-] --> <!-- EDIT20 SECTION "Distributing the Executables" [19311-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:intermediate:best_practices?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:intermediate:best_practices?do=export_xhtmlbody">view online version</a></em></p>

@ -193,7 +193,7 @@ Shininess is a float value between 1 (rough surface with blurry shininess) and 1
</div> </div>
</li> </li>
<li><div> Specify the <code>Specular</code> and <code>Diffuse</code> colors of the shiny spot. <br/> <li><div> Specify the <code>Specular</code> and <code>Diffuse</code> colors of the shiny spot. <br/>
The ColorRGBA value of the light source, often RGBA.White.<pre>mat.setColor&#40;&quot;Specular&quot;,ColorRGBA.White&#41;; Typically you set Specular to the ColorRGBA value of the light source, often RGBA.White.<pre>mat.setColor&#40;&quot;Specular&quot;,ColorRGBA.White&#41;;
mat.setColor&#40;&quot;Diffuse&quot;,ColorRGBA.White&#41;;</pre> mat.setColor&#40;&quot;Diffuse&quot;,ColorRGBA.White&#41;;</pre>
</div> </div>
</li> </li>
@ -208,13 +208,13 @@ You optionally hand-draw this grayscale texture to outline in detail where the s
To deactivate shininess To deactivate shininess
</p> </p>
<ul> <ul>
<li><div> Set the <code>Specular</code> color to <code>ColorRGBA.Black</code>. Do not just set <code>Shininess</code> to 0.<pre>mat.setFloat&#40;&quot;Shininess&quot;, 0f&#41;;</pre> <li><div> Set the <code>Specular</code> color to <code>ColorRGBA.Black</code>. Do not just set <code>Shininess</code> to 0.<pre>mat.setColor&#40;&quot;Specular&quot;,ColorRGBA.Black&#41;;</pre>
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>
<!-- EDIT7 SECTION "(Optional) Shiny" [6096-7327] --> <!-- EDIT7 SECTION "(Optional) Shiny" [6096-7368] -->
<h2><a>(Optional) Glow</a></h2> <h2><a>(Optional) Glow</a></h2>
<div> <div>
@ -255,7 +255,7 @@ Learn more about <a href="/com/jme3/gde/core/docs/jme3/advanced/bloom_and_glow.h
</p> </p>
</div> </div>
<!-- EDIT8 SECTION "(Optional) Glow" [7328-8403] --> <!-- EDIT8 SECTION "(Optional) Glow" [7369-8444] -->
<h2><a>(Optional) Transparent</a></h2> <h2><a>(Optional) Transparent</a></h2>
<div> <div>
@ -326,7 +326,7 @@ getAdditionalRenderState().setAlphaFallOff(0.5f);</td><td>Enables Alpha Testing
Deactivate Alpha Testing for gradually <strong>translucent</strong> objects, such as colored glass, smoked glass, ghosts.</td> Deactivate Alpha Testing for gradually <strong>translucent</strong> objects, such as colored glass, smoked glass, ghosts.</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT10 TABLE [10024-11412] --> <!-- EDIT10 TABLE [10065-11453] -->
<p> <p>
<p><div>It is possible to load a DiffuseMap texture that has an Alpha channel, and combine it with an underlying Material Color. <p><div>It is possible to load a DiffuseMap texture that has an Alpha channel, and combine it with an underlying Material Color.
@ -339,7 +339,7 @@ Deactivate Alpha Testing for gradually <strong>translucent</strong> objects, suc
</p> </p>
</div> </div>
<!-- EDIT9 SECTION "(Optional) Transparent" [8404-12051] --> <!-- EDIT9 SECTION "(Optional) Transparent" [8445-12092] -->
<h2><a>(Optional) Wireframe</a></h2> <h2><a>(Optional) Wireframe</a></h2>
<div> <div>
@ -356,7 +356,7 @@ Additionally to the above settings, you can switch off and on a wireframe render
<td>getAdditionalRenderState().setWireframe(true);</td><td>Switch to showing the (textured) Material in wireframe mode. The wireframe optionally uses the Material&#039;s <code>Color</code> value.</td><td>Use wireframes to debug meshes, or for a &quot;matrix&quot; or &quot;holodeck&quot; effect.</td> <td>getAdditionalRenderState().setWireframe(true);</td><td>Switch to showing the (textured) Material in wireframe mode. The wireframe optionally uses the Material&#039;s <code>Color</code> value.</td><td>Use wireframes to debug meshes, or for a &quot;matrix&quot; or &quot;holodeck&quot; effect.</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT12 TABLE [12266-12551] --><div><span> <!-- EDIT12 TABLE [12307-12592] --><div><span>
<a href="/wiki/doku.php/tag:material?do=showtag&amp;tag=tag%3Amaterial">material</a>, <a href="/wiki/doku.php/tag:material?do=showtag&amp;tag=tag%3Amaterial">material</a>,
<a href="/wiki/doku.php/tag:texture?do=showtag&amp;tag=tag%3Atexture">texture</a>, <a href="/wiki/doku.php/tag:texture?do=showtag&amp;tag=tag%3Atexture">texture</a>,
<a href="/wiki/doku.php/tag:effect?do=showtag&amp;tag=tag%3Aeffect">effect</a>, <a href="/wiki/doku.php/tag:effect?do=showtag&amp;tag=tag%3Aeffect">effect</a>,
@ -366,5 +366,5 @@ Additionally to the above settings, you can switch off and on a wireframe render
</span></div> </span></div>
</div> </div>
<!-- EDIT11 SECTION "(Optional) Wireframe" [12052-] --> <!-- EDIT11 SECTION "(Optional) Wireframe" [12093-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:intermediate:how_to_use_materials?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:intermediate:how_to_use_materials?do=export_xhtmlbody">view online version</a></em></p>

@ -2,13 +2,8 @@
<h1><a>Math Cheat Sheet</a></h1> <h1><a>Math Cheat Sheet</a></h1>
<div> <div>
<p>
Just some math notes to myself…
</p>
</div> </div>
<!-- EDIT1 SECTION "Math Cheat Sheet" [1-64] --> <!-- EDIT1 SECTION "Math Cheat Sheet" [1-31] -->
<h2><a>Formulas</a></h2> <h2><a>Formulas</a></h2>
<div> <div>
@ -57,7 +52,7 @@ new Quaternion q</td><td>Quaternion q = new Quaternion(); <br/>
q.lookAt(v,up)</td> q.lookAt(v,up)</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT3 TABLE [420-1340] --><div><table> <!-- EDIT3 TABLE [387-1307] --><div><table>
<tr> <tr>
<th>I have…</th><th>I want…</th><th>Formula</th> <th>I have…</th><th>I want…</th><th>Formula</th>
</tr> </tr>
@ -105,28 +100,20 @@ x and z coordinates</td><td>float x = FastMath.cos(phi)*r; <br/>
float z = FastMath.sin(phi)*r;</td> float z = FastMath.sin(phi)*r;</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT4 TABLE [1342-2436] --> <!-- EDIT4 TABLE [1309-2403] -->
</div> </div>
<!-- EDIT2 SECTION "Formulas" [65-2438] --> <!-- EDIT2 SECTION "Formulas" [32-2405] -->
<h2><a>Local vs Non-local methods?</a></h2> <h2><a>Local vs Non-local methods?</a></h2>
<div> <div>
<p>
<code>v2 = v.mult(); v2 = v.add(); v2 = v.subtract(); etc</code>
</p>
<ul> <ul>
<li><div> Creates new object as return value, v is unchanged.</div> <li><div> Non-local method creates new object as return value, v remains unchanged. <br/>
<code>v2 = v.mult(); v2 = v.add(); v2 = v.subtract();</code> etc</div>
</li> </li>
</ul> <li><div> Local method changes v directly! <br/>
<code>v.multLocal(); v.addLocal(); v.subtractLocal();</code> etc</div>
<p>
<code>v.multLocal(); v.addLocal(); v.subtractLocal(); etc</code>
</p>
<ul>
<li><div> Changes v.</div>
</li> </li>
</ul> </ul>
</div> </div>
<!-- EDIT5 SECTION "Local vs Non-local methods?" [2439-] --> <!-- EDIT5 SECTION "Local vs Non-local methods?" [2406-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:intermediate:math?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:intermediate:math?do=export_xhtmlbody">view online version</a></em></p>

@ -26,26 +26,26 @@ Assets are files that are not code. Your multi-media assets includes, for exampl
<td> Save sounds into <code>assets/Sounds</code>. </td><td> Don&#039;t leave audio files in a folder outside your JME project: The game cannot load or reference them from there. </td> <td> Save sounds into <code>assets/Sounds</code>. </td><td> Don&#039;t leave audio files in a folder outside your JME project: The game cannot load or reference them from there. </td>
</tr> </tr>
<tr> <tr>
<td> Create simple, low-polygon models. </td><td> Don&#039;t create high-polygon models, they render too slow to be useful in games. </td> <td> Create low-polygon models. </td><td> Don&#039;t create high-polygon models, they render too slow to be useful in games. </td>
</tr> </tr>
<tr> <tr>
<td> Only use Diffuse Map, Normal Map, Glow Map, Specular Map in your models. </td><td> Don&#039;t use unsupported material properties that are not listed in the <a href="/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html">Materials Overview</a>.</td> <td> Only use Diffuse Map, Normal Map, Glow Map, Specular Map in your models&#039; materials. </td><td> Don&#039;t use unsupported material properties that are not listed in the <a href="/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html">Materials Overview</a>.</td>
</tr> </tr>
<tr> <tr>
<td> Use UV texture / texture atlases / baking for each texture map. </td><td> Don&#039;t create models based on multiple separate textures, it will break the model into separate meshes.</td> <td> Use UV texture / texture atlases / baking for each texture map. </td><td> Don&#039;t create models based on multiple separate textures, it will break the model into separate meshes.</td>
</tr> </tr>
<tr> <tr>
<td> Convert original models to .j3o format. Move .j3o files into <code>assets/Models</code>. </td><td>Don&#039;t reference original Blender/Ogre/OBJ files in your load() code, because these unoptimized files are not packaged into the final JAR.</td> <td> Convert original models to JME3&#039;s .j3o format. Move .j3o files into <code>assets/Models</code>. </td><td>Don&#039;t reference original Blender/Ogre/OBJ files in your load() code, because these unoptimized files are not automatically packaged into the final JAR.</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT2 TABLE [542-1593] --> <!-- EDIT2 TABLE [542-1617] -->
<p> <p>
Read on for details. Read on for details.
</p> </p>
</div> </div>
<!-- EDIT1 SECTION "Multi-Media Asset Pipeline" [1-1616] --> <!-- EDIT1 SECTION "Multi-Media Asset Pipeline" [1-1640] -->
<h3><a>Use The Assets Folder</a></h3> <h3><a>Use The Assets Folder</a></h3>
<div> <div>
@ -102,7 +102,7 @@ See also:
</ul> </ul>
</div> </div>
<!-- EDIT3 SECTION "Use The Assets Folder" [1617-3506] --> <!-- EDIT3 SECTION "Use The Assets Folder" [1641-3530] -->
<h3><a>Create Textures and Materials</a></h3> <h3><a>Create Textures and Materials</a></h3>
<div> <div>
@ -128,12 +128,13 @@ Install a graphic editor such as Gimp or Photoshop. <strong>Consult the graphic
<p> <p>
<p><div>Storing the textures inside your project directory is necessary for the paths in JME&#039;s binary model files (.j3o) to work. Treat the paths of your assets like class names of java classes, they define a specific asset. When you later generate .j3o files, compile class files, and distribute the project, paths and files need to be available in their final absolute form. It is imperative to keep the same directory structure from beginning to end. If you ever change the assets directory structure, you have to re-export all affected models, regenerate all affected .j3o files, and manually update all affected paths in your code. <p><div>Storing the textures inside your project directory is necessary for the paths in JME&#039;s binary model files (.j3o) to work. Treat the paths of your assets like class names of java classes, they define a specific asset. When you later generate .j3o files, compile class files, and distribute the project, paths and files need to be available in their final absolute form. It is imperative to keep the same directory structure from beginning to end. <br/>
If you ever change the assets directory structure, you will have to do manual refactoring (just as for Java package name changes): You will need to re-export all affected models, regenerate all affected .j3o files, and manually update all affected paths in your code.
</div></p> </div></p>
</p> </p>
</div> </div>
<!-- EDIT4 SECTION "Create Textures and Materials" [3507-4681] --> <!-- EDIT4 SECTION "Create Textures and Materials" [3531-4793] -->
<h3><a>Create 3D Models</a></h3> <h3><a>Create 3D Models</a></h3>
<div> <div>
@ -145,13 +146,13 @@ Install a mesh editor such as <a href="/com/jme3/gde/core/docs/jme3/external/ble
<ol> <ol>
<li><div> Create 3D models in a mesh editor. </div> <li><div> Create 3D models in a mesh editor. </div>
<ol> <ol>
<li><div> Create simple <strong>low-polygon models</strong>. High-polygon models slow down the game.</div> <li><div> Create simple <strong>low-polygon models</strong>. High-polygon models may look pretty in static 3D art contests, but they unnecessarily slow down dynamic games.</div>
</li> </li>
<li><div> Unwrap the model and generate a <strong>UV texture</strong> (i.e. one texture file that contains all the pieces of one model from different angles). <br/> <li><div> Create materials for your models either in the 3D editor, or in the jME3 <acronym title="Software Development Kit">SDK</acronym>. Only use <strong>Diffuse Map (minimum), Normal Map, Glow Map, and Specular Map.</strong> <br/>
Don&#039;t use multiple separate texture files with one model, it will break the model into several meshes.</div> Every material feature not listed in the <a href="/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html">Materials Overview</a> is unsupported and ignored by JME3.</div>
</li> </li>
<li><div> Create textures for the model: Only use <strong>Diffuse Map (minimum), Normal Map, Glow Map, and Specular Map.</strong> <br/> <li><div> Unwrap the model in the 3D editor and generate a <strong>UV texture</strong> (i.e. one texture file that contains all the pieces of one model from different angles). <br/>
Everything not listed in the <a href="/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html">Materials Overview</a> is ignored by JME.</div> Don&#039;t use multiple separate texture files with one model, it will break the model into several meshes.</div>
</li> </li>
</ol> </ol>
</li> </li>
@ -177,7 +178,7 @@ See also: <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
</p> </p>
</div> </div>
<!-- EDIT5 SECTION "Create 3D Models" [4682-6478] --> <!-- EDIT5 SECTION "Create 3D Models" [4794-6754] -->
<h3><a>Convert 3D Models to .j3o Format</a></h3> <h3><a>Convert 3D Models to .j3o Format</a></h3>
<div> <div>
@ -226,11 +227,25 @@ Use the jMonkeyEngine SceneComposer to add these properties.</div>
</div></p> </div></p>
</p> </p>
<p> </div>
See also: <a href="/com/jme3/gde/core/docs/sdk/model_loader_and_viewer.html">Model Loader and Viewer</a> <!-- EDIT6 SECTION "Convert 3D Models to .j3o Format" [6755-8816] -->
<h2><a>See Also</a></h2>
</p> <div>
<ul>
<li><div> <a href="/com/jme3/gde/core/docs/jme3/advanced/save_and_load.html">Save and Load</a></div>
</li>
<li><div> <a href="/com/jme3/gde/core/docs/sdk/model_loader_and_viewer.html">Model Loader and Viewer</a></div>
</li>
</ul>
<div><span>
<a href="/wiki/doku.php/tag:spatial?do=showtag&amp;tag=tag%3Aspatial">spatial</a>,
<a href="/wiki/doku.php/tag:node?do=showtag&amp;tag=tag%3Anode">node</a>,
<a href="/wiki/doku.php/tag:mesh?do=showtag&amp;tag=tag%3Amesh">mesh</a>,
<a href="/wiki/doku.php/tag:geometry?do=showtag&amp;tag=tag%3Ageometry">geometry</a>,
<a href="/wiki/doku.php/tag:scenegraph?do=showtag&amp;tag=tag%3Ascenegraph">scenegraph</a>,
<a href="/wiki/doku.php/tag:sdk?do=showtag&amp;tag=tag%3Asdk">sdk</a>
</span></div>
</div> </div>
<!-- EDIT6 SECTION "Convert 3D Models to .j3o Format" [6479-] --> <!-- EDIT7 SECTION "See Also" [8817-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:intermediate:multi-media_asset_pipeline?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:intermediate:multi-media_asset_pipeline?do=export_xhtmlbody">view online version</a></em></p>

@ -4,7 +4,7 @@
<p> <p>
It&#039;s a fact of life, math is hard. Unfortunately, 3D graphics require a fair bit of knowledge about the subject. Fortunately, jME is able to hide the majority of the details away from the user. Vectors are the fundamental type in the 3D environment, and it is used extensively. Matrices are also a basic necessity of 3D for representing linear systems. Quaternions are perhaps the most complicated of the basic types and are used for rotation in jME. It&#039;s a fact of life, math is hard. Unfortunately, 3D graphics require a fair bit of knowledge about the subject. Fortunately, jME is able to hide the majority of the details away from the user. Vectors are the fundamental type in the 3D environment, and it is used extensively. Matrices are also a basic necessity of 3D for representing linear systems. <a href="/com/jme3/gde/core/docs/jme3/quaternion.html">Quaternion</a>s are perhaps the most powerful and complicated of the basic types and are used for rotation in jME.
</p> </p>
<p> <p>
@ -16,12 +16,12 @@ To get a visual introduction to math in jME3 for the absolute beginner, check ou
</p> </p>
</div> </div>
<!-- EDIT1 SECTION "Introduction to Mathematical Functionality" [1-944] --> <!-- EDIT1 SECTION "Introduction to Mathematical Functionality" [1-961] -->
<h2><a>Coordinate System</a></h2> <h2><a>Coordinate System</a></h2>
<div> <div>
</div> </div>
<!-- EDIT2 SECTION "Coordinate System" [945-975] --> <!-- EDIT2 SECTION "Coordinate System" [962-992] -->
<h3><a>Definition</a></h3> <h3><a>Definition</a></h3>
<div> <div>
@ -43,7 +43,7 @@ The definition of a coordinate system is defined in jME by the properties sent t
</p> </p>
</div> </div>
<!-- EDIT3 SECTION "Definition" [976-1789] --> <!-- EDIT3 SECTION "Definition" [993-1806] -->
<h2><a>Transformations</a></h2> <h2><a>Transformations</a></h2>
<div> <div>
@ -53,7 +53,7 @@ Transformations define an operation that converts points from one coordinate sys
</p> </p>
</div> </div>
<!-- EDIT4 SECTION "Transformations" [1790-2182] --> <!-- EDIT4 SECTION "Transformations" [1807-2199] -->
<h2><a>Visibility Determination</a></h2> <h2><a>Visibility Determination</a></h2>
<div> <div>
@ -63,17 +63,17 @@ Visibility Determination concerns itself with minimizing the amount of data that
</p> </p>
</div> </div>
<!-- EDIT5 SECTION "Visibility Determination" [2183-2955] --> <!-- EDIT5 SECTION "Visibility Determination" [2200-2972] -->
<h1><a>Fundamental Types</a></h1> <h1><a>Fundamental Types</a></h1>
<div> <div>
</div> </div>
<!-- EDIT6 SECTION "Fundamental Types" [2956-2988] --> <!-- EDIT6 SECTION "Fundamental Types" [2973-3005] -->
<h2><a>ColorRGBA</a></h2> <h2><a>ColorRGBA</a></h2>
<div> <div>
</div> </div>
<!-- EDIT7 SECTION "ColorRGBA" [2989-3009] --> <!-- EDIT7 SECTION "ColorRGBA" [3006-3026] -->
<h3><a>Definition</a></h3> <h3><a>Definition</a></h3>
<div> <div>
@ -87,7 +87,7 @@ ColorRGBA defines a color value in the jME library. The color value is made of t
</p> </p>
</div> </div>
<!-- EDIT8 SECTION "Definition" [3010-3481] --> <!-- EDIT8 SECTION "Definition" [3027-3498] -->
<h3><a>jME Class</a></h3> <h3><a>jME Class</a></h3>
<div> <div>
@ -109,25 +109,25 @@ ColorRGBA will also handle interpolation between two colors. Given a second colo
</p> </p>
</div> </div>
<!-- EDIT9 SECTION "jME Class" [3482-3956] --> <!-- EDIT9 SECTION "jME Class" [3499-3973] -->
<h2><a>Matrix</a></h2> <h2><a>Matrix</a></h2>
<div> <div>
<p> <p>
See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Matrix3f.html"><param name="text" value="<html><u>Javadoc of Matrix3f</u></html>"><param name="textColor" value="blue"></object><br/> See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Matrix3f.html"><param name="text" value="<html><u>Matrix3f Javadoc</u></html>"><param name="textColor" value="blue"></object><br/>
and <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Matrix4f.html"><param name="text" value="<html><u>Javadoc of Matrix4f</u></html>"><param name="textColor" value="blue"></object> and <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Matrix4f.html"><param name="text" value="<html><u>Matrix4f Javadoc</u></html>"><param name="textColor" value="blue"></object>
</p> </p>
</div> </div>
<!-- EDIT10 SECTION "Matrix" [3957-4153] --> <!-- EDIT10 SECTION "Matrix" [3974-4164] -->
<h3><a>Definition</a></h3> <h3><a>Definition</a></h3>
<div> <div>
<p> <p>
A Matrix is typically used as a <em>linear transformation</em> to map vectors to vectors. That is: Y = MX where X is a Vector and M is a Matrix applying any or all transformations (scale, rotate, translate). A Matrix is typically used as a <em>linear transformation</em> to map vectors to vectors. That is: Y = MX where X is a Vector and M is a Matrix applying any or all transformations (scale, <a href="/com/jme3/gde/core/docs/jme3/rotate.html">rotate</a>, translate).
</p> </p>
<p> <p>
@ -148,7 +148,7 @@ There are a few special matrices:
<td>0</td><td>0</td><td>0</td> <td>0</td><td>0</td><td>0</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT12 TABLE [4469-4492] --> <!-- EDIT12 TABLE [4484-4507] -->
<p> <p>
The <em>Identity Matrix</em> is the matrix with 1 on the diagonal entries and 0 for all other entries. The <em>Identity Matrix</em> is the matrix with 1 on the diagonal entries and 0 for all other entries.
@ -164,7 +164,7 @@ The <em>Identity Matrix</em> is the matrix with 1 on the diagonal entries and 0
<td>0</td><td>0</td><td>1</td> <td>0</td><td>0</td><td>1</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT13 TABLE [4593-4616] --> <!-- EDIT13 TABLE [4608-4631] -->
<p> <p>
A Matrix is <em>invertible</em> if there is a matrix <em>M<sup>-1</sup></em> where <em>MM<sup>-1</sup> = M<sup>-1</sup>M = I</em>. A Matrix is <em>invertible</em> if there is a matrix <em>M<sup>-1</sup></em> where <em>MM<sup>-1</sup> = M<sup>-1</sup>M = I</em>.
@ -185,7 +185,7 @@ The <em>transpose</em> of a matrix <em>M = [m<sub>ij</sub>]</em> is <em>M<sup>T<
<td>3</td><td>3</td><td>3</td><td> </td><td>1</td><td>2</td><td>3</td> <td>3</td><td>3</td><td>3</td><td> </td><td>1</td><td>2</td><td>3</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT14 TABLE [4907-4973] --> <!-- EDIT14 TABLE [4922-4988] -->
<p> <p>
A Matrix is symmetric if <em>M</em> = <em>M<sup>T</sup></em>. A Matrix is symmetric if <em>M</em> = <em>M<sup>T</sup></em>.
@ -201,7 +201,7 @@ A Matrix is symmetric if <em>M</em> = <em>M<sup>T</sup></em>.
<td>B</td><td>C</td><td>X</td> <td>B</td><td>C</td><td>X</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT15 TABLE [5028-5053] --> <!-- EDIT15 TABLE [5043-5068] -->
<p> <p>
Where X, A, B, and C equal numbers Where X, A, B, and C equal numbers
</p> </p>
@ -211,7 +211,7 @@ jME includes two types of Matrix classes: Matrix3f and Matrix4f. Matrix3f is a 3
</p> </p>
</div> </div>
<!-- EDIT11 SECTION "Definition" [4154-5315] --> <!-- EDIT11 SECTION "Definition" [4165-5330] -->
<h3><a>Transformations</a></h3> <h3><a>Transformations</a></h3>
<div> <div>
@ -251,7 +251,7 @@ A <em>rotation matrix</em> requires that the transpose and inverse are the same
<td>u<sub>1</sub></td><td>-u<sub>0</sub></td><td>0</td> <td>u<sub>1</sub></td><td>-u<sub>0</sub></td><td>0</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT17 TABLE [6007-6105] --> <!-- EDIT17 TABLE [6022-6120] -->
</div> </div>
<h4><a>Translation</a></h4> <h4><a>Translation</a></h4>
@ -270,14 +270,14 @@ Translation requires a 4x4 matrix, where the vector (x,y,z) is mapped to (x,y,z,
<td>S<sup>T</sup></td><td>1</td> <td>S<sup>T</sup></td><td>1</td>
</tr> </tr>
</table></div> </table></div>
<!-- EDIT18 TABLE [6277-6300] --> <!-- EDIT18 TABLE [6292-6315] -->
<p> <p>
where M is the 3x3 matrix (containing any rotation/scale information), T is the translation vector and S<sup>T</sup> is the transpose Vector of T. 1 is just a constant. where M is the 3x3 matrix (containing any rotation/scale information), T is the translation vector and S<sup>T</sup> is the transpose Vector of T. 1 is just a constant.
</p> </p>
</div> </div>
<!-- EDIT16 SECTION "Transformations" [5316-6472] --> <!-- EDIT16 SECTION "Transformations" [5331-6487] -->
<h3><a>jME Class</a></h3> <h3><a>jME Class</a></h3>
<div> <div>
@ -291,19 +291,19 @@ Most methods are straight forward, and I will leave documentation to the Javadoc
</p> </p>
</div> </div>
<!-- EDIT19 SECTION "jME Class" [6473-6715] --> <!-- EDIT19 SECTION "jME Class" [6488-6730] -->
<h2><a>Vector</a></h2> <h2><a>Vector</a></h2>
<div> <div>
<p> <p>
See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Vector3f.html"><param name="text" value="<html><u>Javadoc</u></html>"><param name="textColor" value="blue"></object><br/> See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Vector3f.html"><param name="text" value="<html><u>Vector3f Javadoc</u></html>"><param name="textColor" value="blue"></object><br/>
and <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Vector2f.html"><param name="text" value="<html><u>Javadoc</u></html>"><param name="textColor" value="blue"></object> and <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Vector2f.html"><param name="text" value="<html><u>Vector2f Javadoc</u></html>"><param name="textColor" value="blue"></object>
</p> </p>
</div> </div>
<!-- EDIT20 SECTION "Vector" [6716-6888] --> <!-- EDIT20 SECTION "Vector" [6731-6921] -->
<h3><a>Definition</a></h3> <h3><a>Definition</a></h3>
<div> <div>
@ -321,7 +321,7 @@ We have two Vectors (2f and 3f) meaning we have tuples of 2 float values or 3 fl
</p> </p>
</div> </div>
<!-- EDIT21 SECTION "Definition" [6889-7313] --> <!-- EDIT21 SECTION "Definition" [6922-7346] -->
<h3><a>Operations</a></h3> <h3><a>Operations</a></h3>
<div> <div>
@ -411,17 +411,17 @@ Vector3f and Vector2f store their values (x, y, z) and (x, y) respectively as fl
</p> </p>
</div> </div>
<!-- EDIT22 SECTION "Operations" [7314-9249] --> <!-- EDIT22 SECTION "Operations" [7347-9282] -->
<h2><a>Quaternion</a></h2> <h2><a>Quaternion</a></h2>
<div> <div>
<p> <p>
See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Quaternion.html"><param name="text" value="<html><u>Javadoc</u></html>"><param name="textColor" value="blue"></object> See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Quaternion.html"><param name="text" value="<html><u>Quaternion Javadoc</u></html>"><param name="textColor" value="blue"></object>
</p> </p>
</div> </div>
<!-- EDIT23 SECTION "Quaternion" [9250-9351] --> <!-- EDIT23 SECTION "Quaternion" [9283-9395] -->
<h3><a>Definition</a></h3> <h3><a>Definition</a></h3>
<div> <div>
@ -431,11 +431,11 @@ Quaternions define a subset of a hypercomplex number system. Quaternions are def
</p> </p>
<p> <p>
Additional benefits of the Quaternion is reducing the chance of <a href="/com/jme3/gde/core/docs/jme3/gimbal_lock.html">Gimbal Lock</a> and allowing for easily interpolation between two rotations (spherical linear interpolation or slerp). Additional benefits of the Quaternion is reducing the chance of <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://en.wikipedia.org/wiki/Gimbal_lock"><param name="text" value="<html><u>Gimbal Lock</u></html>"><param name="textColor" value="blue"></object> and allowing for easily interpolation between two rotations (spherical linear interpolation or slerp).
</p> </p>
<p> <p>
While Quaternions are quite difficult to fully understand, there are an exceeding number of convenience methods to allow you to use them without having to understand the math behind it. Basically, these methods involve nothing more than setting the Quaternion&#039;s x,y,z,w values using other means of representing rotations. The Quaternion is then contained in <a href="/com/jme3/gde/core/docs/jme3/spatial.html">Spatial</a> as its local rotation component. While Quaternions are quite difficult to fully understand, there are an exceeding number of convenience methods to allow you to use them without having to understand the math behind it. Basically, these methods involve nothing more than setting the Quaternion&#039;s x,y,z,w values using other means of representing rotations. The Quaternion is then contained in the <a href="/com/jme3/gde/core/docs/jme3/advanced/spatial.html">Spatial</a> as its local rotation component.
</p> </p>
<p> <p>
@ -485,13 +485,13 @@ These basic operations allow us to convert various rotation representations to Q
</p> </p>
</div> </div>
<!-- EDIT24 SECTION "Definition" [9352-11461] --> <!-- EDIT24 SECTION "Definition" [9396-11564] -->
<h3><a>Angle Axis</a></h3> <h3><a>Angle Axis</a></h3>
<div> <div>
<p> <p>
You might wish to represent your rotations as Angle Axis pairs. That is, you define a axis of rotation and the angle with which to rotate about this axis. Quaternion defines a method <code>fromAngleAxis</code> (and <code>fromAngleNormalAxis</code>) to create a Quaternion from this pair. This is acutally used quite a bit in jME demos to continually rotate objects. You can also obtain a Angle Axis rotation from an existing Quaternion using <code>toAngleAxis</code>. You might wish to represent your rotations as Angle Axis pairs. That is, you define a axis of rotation and the angle with which to <a href="/com/jme3/gde/core/docs/jme3/rotate.html">rotate</a> about this axis. <a href="/com/jme3/gde/core/docs/jme3/quaternion.html">Quaternion</a> defines a method <code>fromAngleAxis</code> (and <code>fromAngleNormalAxis</code>) to create a Quaternion from this pair. This is acutally used quite a bit in jME demos to continually rotate objects. You can also obtain a Angle Axis rotation from an existing Quaternion using <code>toAngleAxis</code>.
</p> </p>
</div> </div>
@ -505,7 +505,7 @@ float angle = 3.14f;
s.getLocalRotation&#40;&#41;.fromAngleAxis&#40;angle, axis&#41;;</pre> s.getLocalRotation&#40;&#41;.fromAngleAxis&#40;angle, axis&#41;;</pre>
</div> </div>
<!-- EDIT25 SECTION "Angle Axis" [11462-12219] --> <!-- EDIT25 SECTION "Angle Axis" [11565-12330] -->
<h3><a>Three Angles</a></h3> <h3><a>Three Angles</a></h3>
<div> <div>
@ -523,13 +523,13 @@ float&#91;&#93; angles = &#123;1, 3, 0&#125;;
s.getLocalRotation&#40;&#41;.fromAngles&#40;angles&#41;;</pre> s.getLocalRotation&#40;&#41;.fromAngles&#40;angles&#41;;</pre>
</div> </div>
<!-- EDIT26 SECTION "Three Angles" [12220-12769] --> <!-- EDIT26 SECTION "Three Angles" [12331-12880] -->
<h3><a>Three Axes</a></h3> <h3><a>Three Axes</a></h3>
<div> <div>
<p> <p>
If you have three axes that define your rotation, where the axes define the left axis, up axis and directional axis respectively) you can make use of <code>fromAxes</code> to generate the Quaternion. It should be noted that this will generate a new <a href="/com/jme3/gde/core/docs/jme3/matrix.html">Matrix</a> object that is then garbage collected, thus, this method should not be used if it will be called many times. Again, <code>toAxes</code> will populate a <a href="/com/jme3/gde/core/docs/jme3/vector.html">Vector3f</a> array. If you have three axes that define your rotation, where the axes define the left axis, up axis and directional axis respectively) you can make use of <code>fromAxes</code> to generate the Quaternion. It should be noted that this will generate a new <a href="/com/jme3/gde/core/docs/jme3/matrix.html">Matrix</a> object that is then garbage collected, thus, this method should not be used if it will be called many times. Again, <code>toAxes</code> will populate a Vector3f array.
</p> </p>
</div> </div>
@ -545,7 +545,7 @@ axes&#91;2&#93; = new Vector3f&#40;0, 0.5f, 0.5f&#41;; //dir
s.getLocalRotation&#40;&#41;.fromAxes&#40;axes&#41;;</pre> s.getLocalRotation&#40;&#41;.fromAxes&#40;axes&#41;;</pre>
</div> </div>
<!-- EDIT27 SECTION "Three Axes" [12770-13527] --> <!-- EDIT27 SECTION "Three Axes" [12881-13627] -->
<h3><a>Rotation Matrix</a></h3> <h3><a>Rotation Matrix</a></h3>
<div> <div>
@ -570,7 +570,7 @@ As you can see there are many ways to build a Quaternion. This allows you to wor
</p> </p>
</div> </div>
<!-- EDIT28 SECTION "Rotation Matrix" [13528-14432] --> <!-- EDIT28 SECTION "Rotation Matrix" [13628-14532] -->
<h3><a>Slerp</a></h3> <h3><a>Slerp</a></h3>
<div> <div>
@ -590,7 +590,7 @@ Quaternion q2;
Quaternion q3 = q1.slerp&#40;q2, 0.5f&#41;;</pre> Quaternion q3 = q1.slerp&#40;q2, 0.5f&#41;;</pre>
</div> </div>
<!-- EDIT29 SECTION "Slerp" [14433-15070] --> <!-- EDIT29 SECTION "Slerp" [14533-15170] -->
<h3><a>Multiplication</a></h3> <h3><a>Multiplication</a></h3>
<div> <div>
@ -608,7 +608,7 @@ Vector3f myVector = new Vector3f&#40;0,0,-1&#41;;
myRotation.multLocal&#40;myVector&#41;;</pre> myRotation.multLocal&#40;myVector&#41;;</pre>
</div> </div>
<!-- EDIT30 SECTION "Multiplication" [15071-15545] --> <!-- EDIT30 SECTION "Multiplication" [15171-15645] -->
<h1><a>Utility Classes</a></h1> <h1><a>Utility Classes</a></h1>
<div> <div>
@ -618,17 +618,17 @@ Along with the base Math classes, jME provides a number of Math classes to make
</p> </p>
</div> </div>
<!-- EDIT31 SECTION "Utility Classes" [15546-15821] --> <!-- EDIT31 SECTION "Utility Classes" [15646-15921] -->
<h2><a>Fast Math</a></h2> <h2><a>Fast Math</a></h2>
<div> <div>
<p> <p>
See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/FastMath.html"><param name="text" value="<html><u>Javadoc</u></html>"><param name="textColor" value="blue"></object> See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/FastMath.html"><param name="text" value="<html><u>FastMath Javadoc</u></html>"><param name="textColor" value="blue"></object>
</p> </p>
</div> </div>
<!-- EDIT32 SECTION "Fast Math" [15822-15919] --> <!-- EDIT32 SECTION "Fast Math" [15922-16028] -->
<h3><a>Definition</a></h3> <h3><a>Definition</a></h3>
<div> <div>
@ -638,7 +638,7 @@ FastMath provides a number of convience methods, and where possible faster versi
</p> </p>
</div> </div>
<!-- EDIT33 SECTION "Definition" [15920-16073] --> <!-- EDIT33 SECTION "Definition" [16029-16182] -->
<h3><a>Usage</a></h3> <h3><a>Usage</a></h3>
<div> <div>
@ -729,17 +729,17 @@ There are five major categories of functions that FastMath provides.
</ul> </ul>
</div> </div>
<!-- EDIT34 SECTION "Usage" [16074-18495] --> <!-- EDIT34 SECTION "Usage" [16183-18604] -->
<h2><a>Line</a></h2> <h2><a>Line</a></h2>
<div> <div>
<p> <p>
See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Line.html"><param name="text" value="<html><u>Javadoc</u></html>"><param name="textColor" value="blue"></object> See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Line.html"><param name="text" value="<html><u>Line Javadoc</u></html>"><param name="textColor" value="blue"></object>
</p> </p>
</div> </div>
<!-- EDIT35 SECTION "Line" [18496-18584] --> <!-- EDIT35 SECTION "Line" [18605-18698] -->
<h3><a>Definition</a></h3> <h3><a>Definition</a></h3>
<div> <div>
@ -749,7 +749,7 @@ A line is a straight one-dimensional figure having no thickness and extending in
</p> </p>
</div> </div>
<!-- EDIT36 SECTION "Definition" [18585-18798] --> <!-- EDIT36 SECTION "Definition" [18699-18912] -->
<h3><a>Usage</a></h3> <h3><a>Usage</a></h3>
<div> <div>
@ -763,24 +763,24 @@ jME defines a Line class that is defined by an origin and direction. In reality,
</p> </p>
</div> </div>
<!-- EDIT37 SECTION "Usage" [18799-19137] --> <!-- EDIT37 SECTION "Usage" [18913-19251] -->
<h3><a>Example 1 - Find a Random Point on a Line</a></h3> <h3><a>Example 1 - Find a Random Point on a Line</a></h3>
<div> <div>
<pre>Line l = new Line&#40;new Vector3f&#40;0,1,0&#41;, new Vector3f&#40;3,2,1&#41;&#41;; <pre>Line l = new Line&#40;new Vector3f&#40;0,1,0&#41;, new Vector3f&#40;3,2,1&#41;&#41;;
Vector3f randomPoint = l.random&#40;&#41;;</pre> Vector3f randomPoint = l.random&#40;&#41;;</pre>
</div> </div>
<!-- EDIT38 SECTION "Example 1 - Find a Random Point on a Line" [19138-19305] --> <!-- EDIT38 SECTION "Example 1 - Find a Random Point on a Line" [19252-19419] -->
<h2><a>Plane</a></h2> <h2><a>Plane</a></h2>
<div> <div>
<p> <p>
See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Plane.html"><param name="text" value="<html><u>Javadoc</u></html>"><param name="textColor" value="blue"></object> See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Plane.html"><param name="text" value="<html><u>Plane Javadoc</u></html>"><param name="textColor" value="blue"></object>
</p> </p>
</div> </div>
<!-- EDIT39 SECTION "Plane" [19306-19396] --> <!-- EDIT39 SECTION "Plane" [19420-19516] -->
<h3><a>Definition</a></h3> <h3><a>Definition</a></h3>
<div> <div>
@ -814,7 +814,7 @@ This gives us the general equation: (ax + by + cz + d = 0)
</p> </p>
</div> </div>
<!-- EDIT40 SECTION "Definition" [19397-20091] --> <!-- EDIT40 SECTION "Definition" [19517-20211] -->
<h3><a>Usage in jME</a></h3> <h3><a>Usage in jME</a></h3>
<div> <div>
@ -846,7 +846,7 @@ These values are returned on a call to <code>whichSide</code>.
</p> </p>
</div> </div>
<!-- EDIT41 SECTION "Usage in jME" [20092-20810] --> <!-- EDIT41 SECTION "Usage in jME" [20212-20930] -->
<h3><a>Example 1 - Determining if a Point is On the Positive Side of a Plane</a></h3> <h3><a>Example 1 - Determining if a Point is On the Positive Side of a Plane</a></h3>
<div> <div>
<pre>Vector3f normal = new Vector3f&#40;0,1,0&#41;; <pre>Vector3f normal = new Vector3f&#40;0,1,0&#41;;
@ -860,7 +860,7 @@ if&#40;side == Plane.NO_SIDE&#41; &#123;
&#125;</pre> &#125;</pre>
</div> </div>
<!-- EDIT42 SECTION "Example 1 - Determining if a Point is On the Positive Side of a Plane" [20811-21185] --> <!-- EDIT42 SECTION "Example 1 - Determining if a Point is On the Positive Side of a Plane" [20931-21305] -->
<h3><a>Example 2 - For the Layperson</a></h3> <h3><a>Example 2 - For the Layperson</a></h3>
<div> <div>
@ -932,17 +932,17 @@ public class TestPlanes
&#125;</pre> &#125;</pre>
</div> </div>
<!-- EDIT43 SECTION "Example 2 - For the Layperson" [21186-23823] --> <!-- EDIT43 SECTION "Example 2 - For the Layperson" [21306-23943] -->
<h2><a>Ray</a></h2> <h2><a>Ray</a></h2>
<div> <div>
<p> <p>
See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Ray.html"><param name="text" value="<html><u>Javadoc</u></html>"><param name="textColor" value="blue"></object> See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Ray.html"><param name="text" value="<html><u>Ray Javadoc</u></html>"><param name="textColor" value="blue"></object>
</p> </p>
</div> </div>
<!-- EDIT44 SECTION "Ray" [23824-23910] --> <!-- EDIT44 SECTION "Ray" [23944-24034] -->
<h3><a>Definition</a></h3> <h3><a>Definition</a></h3>
<div> <div>
@ -956,23 +956,23 @@ This Ray is used extensively in jME for <a href="/com/jme3/gde/core/docs/jme3/pi
</p> </p>
</div> </div>
<!-- EDIT45 SECTION "Definition" [23911-24277] --> <!-- EDIT45 SECTION "Definition" [24035-24401] -->
<h3><a>Example 1 - Create a Ray That Represents Where the Camera is Looking</a></h3> <h3><a>Example 1 - Create a Ray That Represents Where the Camera is Looking</a></h3>
<div> <div>
<pre>Ray ray = new Ray&#40;cam.getLocation&#40;&#41;, cam.getDirection&#40;&#41;&#41;;</pre> <pre>Ray ray = new Ray&#40;cam.getLocation&#40;&#41;, cam.getDirection&#40;&#41;&#41;;</pre>
</div> </div>
<!-- EDIT46 SECTION "Example 1 - Create a Ray That Represents Where the Camera is Looking" [24278-24434] --> <!-- EDIT46 SECTION "Example 1 - Create a Ray That Represents Where the Camera is Looking" [24402-24558] -->
<h2><a>Rectangle</a></h2> <h2><a>Rectangle</a></h2>
<div> <div>
<p> <p>
See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Rectangle.html"><param name="text" value="<html><u>Javadoc</u></html>"><param name="textColor" value="blue"></object> See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Rectangle.html"><param name="text" value="<html><u>Rectangle Javadoc</u></html>"><param name="textColor" value="blue"></object>
</p> </p>
</div> </div>
<!-- EDIT47 SECTION "Rectangle" [24435-24533] --> <!-- EDIT47 SECTION "Rectangle" [24559-24667] -->
<h3><a>Definition</a></h3> <h3><a>Definition</a></h3>
<div> <div>
@ -982,7 +982,7 @@ Rectangle defines a finite plane within three dimensional space that is specifie
</p> </p>
</div> </div>
<!-- EDIT48 SECTION "Definition" [24534-24762] --> <!-- EDIT48 SECTION "Definition" [24668-24896] -->
<h3><a>jME Usage</a></h3> <h3><a>jME Usage</a></h3>
<div> <div>
@ -992,7 +992,7 @@ Rectangle is a straight forward data class that simply maintains values that def
</p> </p>
</div> </div>
<!-- EDIT49 SECTION "jME Usage" [24763-25077] --> <!-- EDIT49 SECTION "jME Usage" [24897-25211] -->
<h3><a>Example 1 : Define a Rectangle and Get a Point From It</a></h3> <h3><a>Example 1 : Define a Rectangle and Get a Point From It</a></h3>
<div> <div>
<pre>Vector3f v1 = new Vector3f&#40;1,0,0&#41;; <pre>Vector3f v1 = new Vector3f&#40;1,0,0&#41;;
@ -1002,17 +1002,17 @@ Rectangle r = new Rectangle&#40;v1, v2, v3&#41;;
Vector3f point = r.random&#40;&#41;;</pre> Vector3f point = r.random&#40;&#41;;</pre>
</div> </div>
<!-- EDIT50 SECTION "Example 1 : Define a Rectangle and Get a Point From It" [25078-25337] --> <!-- EDIT50 SECTION "Example 1 : Define a Rectangle and Get a Point From It" [25212-25471] -->
<h2><a>Triangle</a></h2> <h2><a>Triangle</a></h2>
<div> <div>
<p> <p>
See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Triangle.html"><param name="text" value="<html><u>Javadoc</u></html>"><param name="textColor" value="blue"></object> See <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/doc/com/jme/math/Triangle.html"><param name="text" value="<html><u>Triangle Javadoc</u></html>"><param name="textColor" value="blue"></object>
</p> </p>
</div> </div>
<!-- EDIT51 SECTION "Triangle" [25338-25434] --> <!-- EDIT51 SECTION "Triangle" [25472-25577] -->
<h3><a>Definition</a></h3> <h3><a>Definition</a></h3>
<div> <div>
@ -1022,7 +1022,7 @@ A triangle is a 3-sided polygon. Every triangle has three sides and three angles
</p> </p>
</div> </div>
<!-- EDIT52 SECTION "Definition" [25435-25848] --> <!-- EDIT52 SECTION "Definition" [25578-25991] -->
<h3><a>Usage</a></h3> <h3><a>Usage</a></h3>
<div> <div>
@ -1032,7 +1032,7 @@ jME&#039;s Triangle class is a simple data class. It contains three <a href="/co
</p> </p>
</div> </div>
<!-- EDIT53 SECTION "Usage" [25849-26175] --> <!-- EDIT53 SECTION "Usage" [25992-26318] -->
<h3><a>Example 1 - Creating a Triangle</a></h3> <h3><a>Example 1 - Creating a Triangle</a></h3>
<div> <div>
<pre>//the three points that make up the triangle <pre>//the three points that make up the triangle
@ -1042,12 +1042,12 @@ Vector3f p3 = new Vector3f&#40;0,1,1&#41;;
Triangle t = new Triangle&#40;p1, p2, p3&#41;;</pre> Triangle t = new Triangle&#40;p1, p2, p3&#41;;</pre>
</div> </div>
<!-- EDIT54 SECTION "Example 1 - Creating a Triangle" [26176-26426] --> <!-- EDIT54 SECTION "Example 1 - Creating a Triangle" [26319-26569] -->
<h1><a>Tips and Tricks</a></h1> <h1><a>Tips and Tricks</a></h1>
<div> <div>
</div> </div>
<!-- EDIT55 SECTION "Tips and Tricks" [26427-26457] --> <!-- EDIT55 SECTION "Tips and Tricks" [26570-26600] -->
<h2><a>How do I get height/width of a spatial?</a></h2> <h2><a>How do I get height/width of a spatial?</a></h2>
<div> <div>
@ -1062,11 +1062,22 @@ float y = &#40; &#40;BoundingBox&#41;spatial.getWorldBound&#40;&#41;&#41;.getYEx
float z = &#40; &#40;BoundingBox&#41;spatial.getWorldBound&#40;&#41;&#41;.getZExtent&#40;&#41;;</pre> float z = &#40; &#40;BoundingBox&#41;spatial.getWorldBound&#40;&#41;&#41;.getZExtent&#40;&#41;;</pre>
</div> </div>
<!-- EDIT56 SECTION "How do I get height/width of a spatial?" [26458-26888] --> <!-- EDIT56 SECTION "How do I get height/width of a spatial?" [26601-27031] -->
<h2><a>How do I position the center of a Geomtry?</a></h2> <h2><a>How do I position the center of a Geomtry?</a></h2>
<div> <div>
<pre>geo.center&#40;&#41;.move&#40;pos&#41;;</pre> <pre>geo.center&#40;&#41;.move&#40;pos&#41;;</pre>
</div> </div>
<!-- EDIT57 SECTION "How do I position the center of a Geomtry?" [26889-] --> <!-- EDIT57 SECTION "How do I position the center of a Geomtry?" [27032-27131] -->
<h3><a>See Also</a></h3>
<div>
<ul>
<li><div> <a href="/com/jme3/gde/core/docs/jme3/rotate.html">Rotate</a> </div>
</li>
<li><div> <a href="/com/jme3/gde/core/docs/jme3/quaternion.html">Quaternion</a></div>
</li>
</ul>
</div>
<!-- EDIT58 SECTION "See Also" [27132-] -->
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:math?do=export_xhtmlbody">view online version</a></em></p> <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:math?do=export_xhtmlbody">view online version</a></em></p>

@ -124,9 +124,15 @@ Before you start creating your game, you should have completed the <a href="/com
</p> </p>
<p> <p>
The <a href="/com/jme3/gde/core/docs/jme3.html">intermediate and advanced documentation</a> gives you more details on how to put all the parts together to create an awesome Java 3D game! The <a href="/com/jme3/gde/core/docs/jme3.html">intermediate and advanced documentation</a> gives you more details on how to put all the parts together to create an awesome 3D game in Java!
</p> </p>
<div><span>
<a href="/wiki/doku.php/tag:spatial?do=showtag&amp;tag=tag%3Aspatial">spatial</a>,
<a href="/wiki/doku.php/tag:node?do=showtag&amp;tag=tag%3Anode">node</a>,
<a href="/wiki/doku.php/tag:mesh?do=showtag&amp;tag=tag%3Amesh">mesh</a>,
<a href="/wiki/doku.php/tag:geometry?do=showtag&amp;tag=tag%3Ageometry">geometry</a>,
<a href="/wiki/doku.php/tag:scenegraph?do=showtag&amp;tag=tag%3Ascenegraph">scenegraph</a>
</span></div>
</div> </div>
<!-- EDIT6 SECTION "How to Use This Knowledge?" [2680-] --> <!-- EDIT6 SECTION "How to Use This Knowledge?" [2680-] -->

@ -69,7 +69,7 @@ You will notice a new file &quot;MyLibrary.xml&quot; is created in the plugins b
</p> </p>
<p> <p>
After you are done, you can <a href="/com/jme3/gde/core/docs/sdk/development/setup#jmp_contributions_update_center.html">contribute the plugin in the jMonkeyEngine SDK contribution update center</a>. After you are done, you can <a href="/com/jme3/gde/core/docs/sdk/development/setup#jmonkeyengine_sdk_contributions_update_center.html">contribute the plugin in the jMonkeyEngine SDK contribution update center</a>.
</p> </p>

Loading…
Cancel
Save