Package com.jme3.collision
Class CollisionResults
java.lang.Object
com.jme3.collision.CollisionResults
- All Implemented Interfaces:
Iterable<CollisionResult>
CollisionResults
is a collection returned as a result of a
collision detection operation done by Collidable
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCollision
(CollisionResult result) void
clear()
Clears all collision results added to this listgetCollision
(int index) getCollisionDirect
(int index) Internal use only.iterator()
Iterator for iterating over the collision results.int
size()
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
CollisionResults
public CollisionResults()
-
-
Method Details
-
clear
public void clear()Clears all collision results added to this list -
iterator
Iterator for iterating over the collision results.- Specified by:
iterator
in interfaceIterable<CollisionResult>
- Returns:
- the iterator
-
addCollision
-
size
public int size() -
getClosestCollision
-
getFarthestCollision
-
getCollision
-
getCollisionDirect
Internal use only.- Parameters:
index
- the zero-based index of the desired result- Returns:
- the pre-existing instance
-
toString
-