Module org.dyn4j
Package org.dyn4j.world.listener
Interface DestructionListener<T extends PhysicsBody>
-
- Type Parameters:
T
- thePhysicsBody
type
- All Superinterfaces:
WorldEventListener
- All Known Implementing Classes:
DestructionListenerAdapter
public interface DestructionListener<T extends PhysicsBody> extends WorldEventListener
Interface to listen for implicit destruction events.These events can happen when, for example, a
PhysicsBody
is removed from aPhysicsWorld
where it was attached to aJoint
. The joint must be removed as well. These methods will be called when any such implicit destruction events happen.- Since:
- 1.0.0
- Version:
- 4.0.0
- Author:
- William Bittle
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
destroyed(ContactConstraint<T> contactConstraint)
Called when implicit destruction of aContactConstraint
has occurred.void
destroyed(Joint<T> joint)
Called when implicit destruction of aJoint
has occurred.void
destroyed(T body)
Called when implicit destruction of aPhysicsBody
has occurred.
-
-
-
Method Detail
-
destroyed
void destroyed(Joint<T> joint)
Called when implicit destruction of aJoint
has occurred.Modification of the
PhysicsWorld
is permitted during this method.- Parameters:
joint
- theJoint
that was destroyed- See Also:
CollisionWorld.removeBody(CollisionBody)
,PhysicsWorld.removeAllBodiesAndJoints(boolean)
-
destroyed
void destroyed(ContactConstraint<T> contactConstraint)
Called when implicit destruction of aContactConstraint
has occurred.Modification of the
PhysicsWorld
is not permitted during this method.- Parameters:
contactConstraint
- theContactConstraint
that was destroyed- See Also:
CollisionWorld.removeBody(CollisionBody)
,PhysicsWorld.removeAllBodiesAndJoints(boolean)
-
destroyed
void destroyed(T body)
Called when implicit destruction of aPhysicsBody
has occurred.Modification of the
PhysicsWorld
is not permitted during this method.- Parameters:
body
- thePhysicsBody
that was destroyed- Since:
- 1.0.2
- See Also:
PhysicsWorld.removeAllBodiesAndJoints(boolean)
-
-