Class CollisionResults

java.lang.Object
com.ardor3d.intersection.CollisionResults
Direct Known Subclasses:
BoundingCollisionResults, PrimitiveCollisionResults

public abstract class CollisionResults extends Object
CollisionResults stores the results of a collision test by storing an ArrayList of CollisionData.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor instantiates a new PickResults object.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    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 new CollisionData object into the results list.
    void
    clear clears the list of all CollisionData.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CollisionResults

      public CollisionResults()
      Constructor instantiates a new PickResults object.
  • Method Details

    • 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(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.
      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.