|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ContactListener
Implement this class to get contact information. You can use these results for things like sounds and game logic. You can also get contact results by traversing the contact lists after the time step. However, you might miss some contacts because continuous physics leads to sub-stepping. Additionally you may receive multiple callbacks for the same contact in a single time step. You should strive to make your callbacks efficient because there may be many callbacks per time step.
Method Summary | |
---|---|
void |
beginContact(Contact contact)
Called when two fixtures begin to touch. |
void |
endContact(Contact contact)
Called when two fixtures cease to touch. |
void |
postSolve(Contact contact,
ContactImpulse impulse)
This lets you inspect a contact after the solver is finished. |
void |
preSolve(Contact contact,
Manifold oldManifold)
This is called after a contact is updated. |
Method Detail |
---|
void beginContact(Contact contact)
contact
- void endContact(Contact contact)
contact
- void preSolve(Contact contact, Manifold oldManifold)
contact
- oldManifold
- void postSolve(Contact contact, ContactImpulse impulse)
contact
- impulse
- this is usually a pooled variable, so it will be modified after
this call
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |