API reference
Three namespaces, and you almost certainly want the first.
| Namespace | What it is |
|---|---|
Box3D |
The idiomatic surface. Start at PhysicsWorld, then Body and Shape. |
Box3D.Native |
A literal mirror of the Box3D C API: the same names, the same signatures, no abstraction. |
Box3D.Interop |
The one sanctioned bridge between the two, as extension methods. |
Everything in Box3D validates its input, manages nothing you did not ask it to
manage, and allocates nothing on the simulation path.
Nothing in Box3D.Native validates anything or manages a lifetime. Passing an
invalid identifier crashes the process rather than raising an exception. Reach
for it when you need one of the roughly 580 exported functions the idiomatic
surface does not cover yet — the native layer
explains the boundary, and API coverage lists what is on
each side of it.
Importing Box3D.Interop is what makes reaching for the C layer visible in your
own source.
Where to start
| Looking for | Type |
|---|---|
| Creating and stepping a world | PhysicsWorld |
| A physical object | Body, BodyDefinition |
| Collision geometry | Shape, ShapeDefinition |
| Ray casts and overlaps | RaycastHit, IRaycastCallback |
| What happened last step | WorldEvents |
| Constraints | Joint and the nine specific handles |
| Terrain | HeightField, CollisionMesh |
| Character movement | CharacterMover |
| Drawing the simulation | IDebugDrawer |