b2ContactListener Class Reference
Implement this class to get collision results. More...
Public Member Functions | |
virtual void | Add (const b2ContactPoint *point) |
Called when a contact point is added. | |
virtual void | Persist (const b2ContactPoint *point) |
Called when a contact point persists. | |
virtual void | Remove (const b2ContactPoint *point) |
Called when a contact point is removed. | |
virtual void | Result (const b2ContactResult *point) |
Called after a contact point is solved. |
Detailed Description
Implement this class to get collision results.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.
- Warning:
- The contact separation is the last computed value.
You cannot create/destroy Box2D entities inside these callbacks.
Member Function Documentation
virtual void b2ContactListener::Add | ( | const b2ContactPoint * | point | ) | [inline, virtual] |
Called when a contact point is added.
This includes the geometry and the forces.
virtual void b2ContactListener::Persist | ( | const b2ContactPoint * | point | ) | [inline, virtual] |
Called when a contact point persists.
This includes the geometry and the forces.
virtual void b2ContactListener::Remove | ( | const b2ContactPoint * | point | ) | [inline, virtual] |
Called when a contact point is removed.
This includes the last computed geometry and forces.
The documentation for this class was generated from the following file:
- b2WorldCallbacks.h
Generated on Sun Apr 13 15:21:27 2008 for Box2D by 1.5.4