Interface TimeOfImpactListener<T extends PhysicsBody>
- Type Parameters:
- All Superinterfaces:
- All Known Implementing Classes:
public interface TimeOfImpactListener<T extends PhysicsBody> extends WorldEventListenerInterface to listen for time of impact events.
Time of impact events are events fired when a collision was missed by the discrete collision detection routines, and then caught by the continuous collision detection routines.
Modification of the
PhysicsWorldis not permitted during these methods.
- William Bittle
boolean collision(T body1, BodyFixture fixture1, T body2, BodyFixture fixture2, TimeOfImpact toi)Called when a time of impact has been detected between two bodies.
Returning true from this method indicates that the collision of these two
PhysicsBodys should be processed (solved).
The values of the
toiparameter can be changed in this method.