box3d library
Dart FFI bindings for the box3d 3D rigid body physics engine.
await Box3d.ensureInitialized(), create a Box3dWorld, add bodies and
shapes, and advance it with Box3dWorld.step. This package is
engine-agnostic: it mirrors box3d and depends on no rendering engine.
Classes
- Box3d
- Entry point for one-time box3d initialization.
- Box3dBody
-
A rigid body in a Box3dWorld. Create one with
world.createBody(...). - Box3dContactBegan
- Two shapes began touching this step. shapeA / shapeB are the packed shape handles (compare against a Box3dShape.handle).
- Box3dContactEnded
- Two shapes stopped touching this step.
- Box3dContactPoint
- One point of a solid contact manifold.
- Box3dEvents
- All events collected during one Box3dWorld.step, drained together.
- Box3dFrame
- A joint's attachment frame on one body: a body-local anchor position and a rotation.
- Box3dJoint
-
A constraint between two bodies. Create one with the
world.create*Jointmethods; call destroy to remove it. - Box3dMaterial
- Surface properties of a shape.
- Box3dRayHit
- A hit from a ray cast or shape cast. shape is the packed shape handle (compare against a Box3dShape.handle).
- Box3dSensorBegan
- A shape entered a sensor this step. sensorShape is the sensor; visitorShape is the shape that entered it.
- Box3dSensorEnded
- A shape left a sensor this step.
- Box3dShape
-
A collider attached to a Box3dBody. Returned by the body's
add*shape methods; use it to change the surface material, collision filter, or to remove the collider. - Box3dWorld
- A box3d simulation world: a container of bodies and shapes advanced with step.
Enums
- Box3dBodyType
- How a body participates in the simulation.
Constants
- box3dBindingsVersion → const String
- The version of these Dart bindings, mirroring the package's pubspec version.