b2ContactListener Class Reference

Implement this class to get collision results. More...

List of all members.

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.


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 ( 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.


The documentation for this class was generated from the following file:
Generated on Fri Mar 7 23:58:18 2008 for Box2D by  doxygen 1.5.4