Package com.ardor3d.intersection
Class CollisionResults
java.lang.Object
com.ardor3d.intersection.CollisionResults
- Direct Known Subclasses:
BoundingCollisionResults
,PrimitiveCollisionResults
CollisionResults
stores the results of a collision test by storing an ArrayList of CollisionData.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
addCollision
(Mesh s, Mesh t) addCollision
is an abstract method whose intent is the subclass determines what to do when two Mesh object's bounding volumes are determined to intersect.void
addCollisionData
places a newCollisionData
object into the results list.void
clear()
clear
clears the list of all CollisionData.getCollisionData
(int i) getCollisionData
retrieves a CollisionData from a specific index.int
getNumber
retrieves the number of collisions that have been placed in the results.abstract void
processCollisions
is an abstract method whose intent is the subclass defines how to process the collision data that has been collected since the last clear.
-
Constructor Details
-
CollisionResults
public CollisionResults()Constructor instantiates a newPickResults
object.
-
-
Method Details
-
addCollisionData
addCollisionData
places a newCollisionData
object into the results list.- Parameters:
col
- The collision data to be placed in the results list.
-
getNumber
public int getNumber()getNumber
retrieves the number of collisions that have been placed in the results.- Returns:
- the number of collisions in the list.
-
getCollisionData
getCollisionData
retrieves a CollisionData from a specific index.- Parameters:
i
- the index requested.- Returns:
- the CollisionData at the specified index.
-
clear
public void clear()clear
clears the list of all CollisionData. -
addCollision
addCollision
is an abstract method whose intent is the subclass determines what to do when two Mesh object's bounding volumes are determined to intersect.- Parameters:
s
- the first Mesh that intersects.t
- the second Mesh that intersects.
-
processCollisions
public abstract void processCollisions()processCollisions
is an abstract method whose intent is the subclass defines how to process the collision data that has been collected since the last clear.
-