Skip to main content

Module id

Module id 

Source
Expand description

Port of box3d-cpp-reference/include/box3d/id.h

These ids are opaque handles to internal Box3D objects, passed by value. All ids are null when zero-initialized. The store/load helpers pack and unpack a handle into a plain integer; the bit layout is reproduced exactly so handles round-trip identically to the C library.

Box3D has no chain id (unlike Box2D). Contact ids pack into three u32 values rather than a single u64.

SPDX-FileCopyrightText: 2026 Erin Catto SPDX-License-Identifier: MIT

Structs§

BodyId
Body id references a body instance. Treat as an opaque handle.
ContactId
Contact id references a contact instance. Treat as an opaque handle.
JointId
Joint id references a joint instance. Treat as an opaque handle.
ShapeId
Shape id references a shape instance. Treat as an opaque handle.
WorldId
World id references a world instance. Treat as an opaque handle.

Constants§

NULL_BODY_ID
A null body id. (b3_nullBodyId)
NULL_CONTACT_ID
A null contact id. (b3_nullContactId)
NULL_JOINT_ID
A null joint id. (b3_nullJointId)
NULL_SHAPE_ID
A null shape id. (b3_nullShapeId)
NULL_WORLD_ID
A null world id. (b3_nullWorldId)