com.jme.intersection
Class CollisionResults

java.lang.Object
  extended by com.jme.intersection.CollisionResults
Direct Known Subclasses:
BoundingCollisionResults, TriangleCollisionResults

public abstract class CollisionResults
extends java.lang.Object

CollisionResults stores the results of a collision test by storing an ArrayList of CollisionData.

Version:
$Id: CollisionResults.java 4131 2009-03-19 20:15:28Z blaine.dev $
Author:
Mark Powell

Constructor Summary
CollisionResults()
          Constructor instantiates a new PickResults object.
 
Method Summary
abstract  void addCollision(Geometry s, Geometry t)
          addCollision is an abstract method whose intent is the subclass determines what to do when two Geometry object's bounding volumes are determined to intersect.
 void addCollisionData(CollisionData col)
          addCollisionData places a new CollisionData object into the results list.
 void clear()
          clear clears the list of all CollisionData.
 CollisionData getCollisionData(int i)
          getCollisionData retrieves a CollisionData from a specific index.
 int getNumber()
          getNumber retrieves the number of collisions that have been placed in the results.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollisionResults

public CollisionResults()
Constructor instantiates a new PickResults object.

Method Detail

addCollisionData

public void addCollisionData(CollisionData col)
addCollisionData places a new CollisionData 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

public CollisionData getCollisionData(int i)
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

public abstract void addCollision(Geometry s,
                                  Geometry t)
addCollision is an abstract method whose intent is the subclass determines what to do when two Geometry object's bounding volumes are determined to intersect.

Parameters:
s - the first Geometry that intersects.
t - the second Geometry 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.