Box2D 3.1.0
A 2D physics engine for games
|
These ids serve as handles to internal Box2D objects. More...
Data Structures | |
struct | b2WorldId |
World id references a world instance. This should be treated as an opaque handle. More... | |
struct | b2BodyId |
Body id references a body instance. This should be treated as an opaque handle. More... | |
struct | b2ShapeId |
Shape id references a shape instance. This should be treated as an opaque handle. More... | |
struct | b2JointId |
Joint id references a joint instance. This should be treated as an opaque handle. More... | |
struct | b2ChainId |
Chain id references a chain instances. This should be treated as an opaque handle. More... | |
Macros | |
#define | B2_IS_NULL(id) |
Macro to determine if any id is null. | |
#define | B2_IS_NON_NULL(id) |
Macro to determine if any id is non-null. | |
#define | B2_ID_EQUALS(id1, id2) |
Compare two ids for equality. Doesn't work for b2WorldId. | |
These ids serve as handles to internal Box2D objects.
These should be considered opaque data and passed by value. Include this header if you need the id types and not the whole Box2D API. All ids are considered null if initialized to zero.
For example in C++:
Or in C:
These are both considered null.
struct b2WorldId |
struct b2BodyId |
struct b2ShapeId |
struct b2JointId |
struct b2ChainId |
#define B2_ID_EQUALS | ( | id1, | |
id2 ) |
Compare two ids for equality. Doesn't work for b2WorldId.
#define B2_IS_NON_NULL | ( | id | ) |
Macro to determine if any id is non-null.
#define B2_IS_NULL | ( | id | ) |
Macro to determine if any id is null.