Interface BoundsListener<T extends CollisionBody<E>,E extends Fixture>
- All Superinterfaces:
- All Known Implementing Classes:
public interface BoundsListener<T extends CollisionBody<E>,E extends Fixture> extends WorldEventListenerRepresents an object that is notified when a
CollisionBodygoes out of
NOTE: Modification of the simulation in these methods can cause unexpected behavior.
- William Bittle
- See Also:
void outside(T body)Method called when a
CollisionBodyis outside the
Boundsof a simulation.
CollisionBodymust be fully outside the bounds defined in the world. This means that all the fixtures are outside the bounds.
When this is detected the
CollisionBodyis set to disabled and is effectively ignored until moved back within the bounds and enabled again.
Typically this event is used to clean up bodies that have strayed from the simulation, but be aware that the removal of the body cannot be done here. Instead it must be done after the simulation step completes.