Box2D 3.2.0
A 2D physics engine for games
Loading...
Searching...
No Matches

Access to contacts. More...

Data Structures

struct  b2ContactData
 The contact data for two shapes. More...

Functions

bool b2Contact_IsValid (b2ContactId id)
 Contact identifier validation. Provides validation for up to 2^32 allocations.
b2ContactData b2Contact_GetData (b2ContactId contactId)
 Get the data for a contact. The manifold may have no points if the contact is not touching.

Detailed Description

Access to contacts.


Data Structure Documentation

◆ b2ContactData

struct b2ContactData

The contact data for two shapes.

By convention the manifold normal points from shape A to shape B.

See also
b2Shape_GetContactData() and b2Body_GetContactData()
Data Fields
b2ContactId contactId The contact id.

You may hold onto this to track a contact across time steps. This id may become orphaned. Use b2Contact_IsValid before using it for other functions.

b2Manifold manifold The manifold copied from the contact.
b2ShapeId shapeIdA The first shape id.
b2ShapeId shapeIdB The second shape id.