B2Contact

From Box2D Wiki

Internal Information

The following text is interesting in case you want to know how Box2D behaves internally, it is not required to use the API.

b2Contact
Box2D/Dynamics
Visibility Private
Children b2CircleContact
b2EdgeAndCircleContact
b2PolyAndCircleContact
b2PolyContact
b2PolyAndEdgeContact
b2NullContact
Source reference H.png Cpp.png

b2Contact is the abstract base class for all contacts between two shapes. Each subclass is responsible for calculating the physical parameter of the contact - contact points, normal, penetration distance etc - for a given pair of shape classes.

Contacts are generated speculatively and persist through steps. This means when two non-filtered shapes have overlapping AABBs, a contact is constructed, and inserted in both shapes contact lists. It is not destroyed until the AABBs cease to overlap.

Contacts are used to pass information to the solver and to the contact listener.


TOOLBOX
LANGUAGES