|
|
@@ -19,7 +19,8 @@ Non-physical collision detection is interesting because it uses less computing r
|
|
|
The interface com.jme3.collision.Collidable declares one method that returns how many collisions were found between two Collidables: `collideWith(Collidable other, CollisionResults results)`.
|
|
|
|
|
|
* A `com.jme3.collision.CollisionResults` object is an ArrayList of comparable `com.jme3.collision.CollisionResult` objects.
|
|
|
-* You can iterate over the CollisionResults to identify the other parties involved in the collision. +Note that jME counts _all_ collisions, this means a ray intersecting a box will be counted as two hits, one on the front where the ray enters, and one on the back where the ray exits.
|
|
|
+* You can iterate over the CollisionResults to identify the other parties involved in the collision. +
|
|
|
+Note that jME counts _all_ collisions, this means a ray intersecting a box will be counted as two hits, one on the front where the ray enters, and one on the back where the ray exits.
|
|
|
[cols="2", options="header"]
|
|
|
|===
|
|
|
|
|
|
@@ -162,7 +163,7 @@ mesh.updateBound();
|
|
|
|
|
|
== Mesh and Scene Graph Collision
|
|
|
|
|
|
-One of the supported `Collidable`s are meshes and scene graph objects. To execute a collision detection query against a scene graph, use `Spatial.collideWith()`. 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 link:http://en.wikipedia.org/wiki/Bounding_interval_hierarchy[|Bounding Interval Hierarchy (BIH)] 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 link:http://jmonkeyengine.org/javadoc/com/jme3/scene/Mesh.html#createCollisionData()[Mesh.createCollisionData()] on the changed mesh to update the BIH tree.
|
|
|
+One of the supported `Collidable`s are meshes and scene graph objects. To execute a collision detection query against a scene graph, use `Spatial.collideWith()`. 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 link:http://en.wikipedia.org/wiki/Bounding_interval_hierarchy[|Bounding Interval Hierarchy (BIH)] 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 link:http://javadoc.jmonkeyengine.org/com/jme3/scene/Mesh.html#createCollisionData--[Mesh.createCollisionData()] on the changed mesh to update the BIH tree.
|
|
|
|
|
|
|
|
|
== Intersection
|