Package com.ardor3d.intersection
Class PickingUtil
java.lang.Object
com.ardor3d.intersection.PickingUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
findCollisions
(Spatial spatial, Spatial scene, CollisionResults results) static void
findPick
(Spatial spatial, Ray3 ray, PickResults results) Finds a pick using the given ray starting at the scenegraph given as spatial.static void
findPick
(Spatial spatial, Ray3 ray, PickResults results, boolean ignoreCulled) Finds a pick using the given ray starting at the scenegraph given as spatial.static void
findPrimitiveCollision
(Mesh testMesh, Mesh toCheck, List<PrimitiveKey> testIndex, List<PrimitiveKey> otherIndex) This function finds all intersections between this mesh and the checking one.static boolean
hasCollision
(Spatial spatial, Spatial scene, boolean checkPrimitives) static boolean
hasPrimitiveCollision
(Mesh testMesh, Mesh toCheck) This function checks for intersection between this mesh and the given one.
-
Constructor Details
-
PickingUtil
public PickingUtil()
-
-
Method Details
-
findPick
Finds a pick using the given ray starting at the scenegraph given as spatial. Results are stored in the given results value. NB: Spatials with CullHint ALWAYS will be skipped.- Parameters:
spatial
- the spatialray
- the rayresults
- the results
-
findPick
Finds a pick using the given ray starting at the scenegraph given as spatial. Results are stored in the given results value.- Parameters:
spatial
- the spatialray
- the rayresults
- the resultsignoreCulled
- if true, Spatials with CullHint ALWAYS will be skipped.
-
findCollisions
-
hasPrimitiveCollision
This function checks for intersection between this mesh and the given one. On the first intersection, true is returned.- Parameters:
testMesh
- The meshtoCheck
- The intersection testing mesh.- Returns:
- true if they intersect.
-
findPrimitiveCollision
public static void findPrimitiveCollision(Mesh testMesh, Mesh toCheck, List<PrimitiveKey> testIndex, List<PrimitiveKey> otherIndex) This function finds all intersections between this mesh and the checking one. The intersections are stored as PrimitiveKeys.- Parameters:
testMesh
- The meshtoCheck
- The Mesh to check.testIndex
- The array of PrimitiveKeys intersecting in this mesh.otherIndex
- The array of PrimitiveKeys intersecting in the given mesh.
-
hasCollision
-