Public Member Functions | |
virtual void | Add (b2ContactPoint *point)=0 |
Called when a contact point is added. | |
virtual void | Persist (b2ContactPoint *point)=0 |
Called when a contact point persists. | |
virtual void | Remove (b2ContactPoint *point)=0 |
Called when a contact point is removed. |
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.
You cannot create/destroy Box2D entities inside these callbacks.
virtual void b2ContactListener::Add | ( | b2ContactPoint * | point | ) | [pure virtual] |
Called when a contact point is added.
This includes the geometry and the forces.
virtual void b2ContactListener::Persist | ( | b2ContactPoint * | point | ) | [pure virtual] |
Called when a contact point persists.
This includes the geometry and the forces.
virtual void b2ContactListener::Remove | ( | b2ContactPoint * | point | ) | [pure virtual] |
Called when a contact point is removed.
This includes the last computed geometry and forces.