public class CollisionResults extends java.lang.Object implements java.lang.Iterable<CollisionResult>
CollisionResults
is a collection returned as a result of a
collision detection operation done by Collidable
.Constructor and Description |
---|
CollisionResults() |
Modifier and Type | Method and Description |
---|---|
void |
addCollision(CollisionResult result) |
void |
clear()
Clears all collision results added to this list
|
CollisionResult |
getClosestCollision() |
CollisionResult |
getCollision(int index) |
CollisionResult |
getCollisionDirect(int index)
Internal use only.
|
CollisionResult |
getFarthestCollision() |
java.util.Iterator<CollisionResult> |
iterator()
Iterator for iterating over the collision results.
|
int |
size() |
java.lang.String |
toString() |
public void clear()
public java.util.Iterator<CollisionResult> iterator()
iterator
in interface java.lang.Iterable<CollisionResult>
public void addCollision(CollisionResult result)
public int size()
public CollisionResult getClosestCollision()
public CollisionResult getFarthestCollision()
public CollisionResult getCollision(int index)
public CollisionResult getCollisionDirect(int index)
index
- public java.lang.String toString()
toString
in class java.lang.Object