Package com.jme3.bullet.collision
Interface ContactListener
- All Known Implementing Classes:
DeformableSpace
,MultiBodySpace
,PhysicsSoftSpace
,PhysicsSpace
public interface ContactListener
Interface to receive immediate notifications when 2 collision objects come
into contact.
Bullet implements persistent contacts, so manifold IDs and point IDs are sometimes reused from step to step.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onContactEnded
(long manifoldId) Invoked immediately after a contact manifold is removed.void
onContactProcessed
(PhysicsCollisionObject pcoA, PhysicsCollisionObject pcoB, long manifoldPointId) Invoked immediately after a contact point is refreshed without being removed.void
onContactStarted
(long manifoldId) Invoked immediately after a contact manifold is created.
-
Method Details
-
onContactEnded
void onContactEnded(long manifoldId) Invoked immediately after a contact manifold is removed.- Parameters:
manifoldId
- the native ID of thebtPersistentManifold
(not zero)
-
onContactProcessed
void onContactProcessed(PhysicsCollisionObject pcoA, PhysicsCollisionObject pcoB, long manifoldPointId) Invoked immediately after a contact point is refreshed without being removed. Skipped for Sphere-Sphere contacts.- Parameters:
pcoA
- the first involved object (not null)pcoB
- the 2nd involved object (not null)manifoldPointId
- the native ID of thebtManifoldPoint
(not zero)
-
onContactStarted
void onContactStarted(long manifoldId) Invoked immediately after a contact manifold is created.- Parameters:
manifoldId
- the native ID of thebtPersistentManifold
(not zero)
-