com.threed.jpct
Interface CollisionListener

All Superinterfaces:
java.io.Serializable

public interface CollisionListener
extends java.io.Serializable

Implement this interface and assign instances of your class to Object3Ds to receive collision events in case of collisions.


Method Summary
 void collision(CollisionEvent ce)
          This method will be called in case of a collision.
 boolean requiresPolygonIDs()
          If the listener needs information about which polygons were affected by the collision, this method has to return true.
 

Method Detail

collision

public void collision(CollisionEvent ce)
This method will be called in case of a collision.

Parameters:
ce - the CollisionEvent
See Also:
CollisionEvent

requiresPolygonIDs

public boolean requiresPolygonIDs()
If the listener needs information about which polygons were affected by the collision, this method has to return true. Otherwise it may return false to save some cycles. If an object has more than one listener of this type and not all of them are returning true here, the behaviour for the ones that return false is undefined when asking the CollisionEvent for these polygons.

Returns:
true or false