Class CollisionResults

java.lang.Object
com.jme3.collision.CollisionResults
All Implemented Interfaces:
Iterable<CollisionResult>

public class CollisionResults extends Object implements Iterable<CollisionResult>
CollisionResults is a collection returned as a result of a collision detection operation done by Collidable.
  • Constructor Details

    • CollisionResults

      public CollisionResults()
  • Method Details

    • clear

      public void clear()
      Clears all collision results added to this list
    • iterator

      public Iterator<CollisionResult> iterator()
      Iterator for iterating over the collision results.
      Specified by:
      iterator in interface Iterable<CollisionResult>
      Returns:
      the iterator
    • addCollision

      public void addCollision(CollisionResult result)
    • size

      public int size()
    • getClosestCollision

      public CollisionResult getClosestCollision()
    • getFarthestCollision

      public CollisionResult getFarthestCollision()
    • getCollision

      public CollisionResult getCollision(int index)
    • getCollisionDirect

      public CollisionResult getCollisionDirect(int index)
      Internal use only.
      Parameters:
      index - the zero-based index of the desired result
      Returns:
      the pre-existing instance
    • toString

      public String toString()
      Overrides:
      toString in class Object