Expand description
Pure Rust port of Box3D, Erin Catto’s 3D physics engine for games.
The port targets exact behavioral match with the C source pinned in the
box3d-cpp-reference/ submodule: same algorithms, same f32 arithmetic, same edge
cases, including Box3D’s hand-rolled cross-platform-deterministic trigonometry.
Enable the double-precision feature to mirror upstream BOX3D_DOUBLE_PRECISION
(large-world mode). See the repository README for status and a quick-start.
Re-exports§
pub use debug_draw::make_debug_color;pub use debug_draw::CreateDebugShapeCallback;pub use debug_draw::DebugDraw;pub use debug_draw::DebugMaterial;pub use debug_draw::DebugShape;pub use debug_draw::DestroyDebugShapeCallback;pub use debug_draw::HexColor;pub use id::BodyId;pub use id::ContactId;pub use id::JointId;pub use id::ShapeId;pub use id::WorldId;pub use math_functions::Aabb;pub use math_functions::CosSin;pub use math_functions::Matrix3;pub use math_functions::Plane;pub use math_functions::Pos;pub use math_functions::Quat;pub use math_functions::SegmentDistanceResult;pub use math_functions::Transform;pub use math_functions::Triangle;pub use math_functions::Vec2;pub use math_functions::Vec3;pub use math_functions::WorldTransform;pub use math_functions::MAT3_IDENTITY;pub use math_functions::MAT3_ZERO;pub use math_functions::PI;pub use math_functions::POS_ZERO;pub use math_functions::QUAT_IDENTITY;pub use math_functions::TRANSFORM_IDENTITY;pub use math_functions::VEC3_AXIS_X;pub use math_functions::VEC3_AXIS_Y;pub use math_functions::VEC3_AXIS_Z;pub use math_functions::VEC3_ONE;pub use math_functions::VEC3_ZERO;pub use math_functions::WORLD_TRANSFORM_IDENTITY;pub use types::default_body_def;pub use types::default_distance_joint_def;pub use types::default_explosion_def;pub use types::default_filter;pub use types::default_filter_joint_def;pub use types::default_motor_joint_def;pub use types::default_parallel_joint_def;pub use types::default_prismatic_joint_def;pub use types::default_query_filter;pub use types::default_revolute_joint_def;pub use types::default_shape_def;pub use types::default_spherical_joint_def;pub use types::default_weld_joint_def;pub use types::default_wheel_joint_def;pub use types::default_world_def;pub use types::BodyDef;pub use types::BodyType;pub use types::Capacity;pub use types::Counters;pub use types::DistanceJointDef;pub use types::ExplosionDef;pub use types::Filter;pub use types::FilterJointDef;pub use types::JointDef;pub use types::MotionLocks;pub use types::MotorJointDef;pub use types::ParallelJointDef;pub use types::PrismaticJointDef;pub use types::QueryFilter;pub use types::RayResult;pub use types::RevoluteJointDef;pub use types::ShapeDef;pub use types::SphericalJointDef;pub use types::WeldJointDef;pub use types::WheelJointDef;pub use types::WorldCastOutput;pub use types::WorldDef;pub use types::BODY_TYPE_COUNT;
Modules§
- aabb
- bitset
- body
- broad_
phase - compound
- Baked compound collision shape.
- constants
- constraint_
graph - contact
- contact_
solver - Contact constraint kernels from contact_solver.c.
- core
- debug_
draw - Debug draw interface (
b3DebugDraw), color palette (b3HexColor), and debug-material packing fromtypes.h/types.c. - determinism
- Falling-ragdoll determinism scene helpers from
shared/determinism.c. - distance
- dynamic_
tree - events
- geometry
- Shape geometry queries: sphere, capsule, and hull mass/AABB/overlap/cast.
- height_
field - Height field collision shape.
- hull
- Convex hull construction and query module.
- human
- Human ragdoll builder from
shared/human.c/shared/human.h. - id
- Port of box3d-cpp-reference/include/box3d/id.h
- id_pool
- island
- joint
- manifold
- Contact manifold generation for convex primitive pairs and mesh narrow phase.
- math_
functions - mesh
- Triangle mesh collision shape.
- mover
- Character mover plane solver from box3d-cpp-reference/src/mover.c.
- name_
cache - recording
- Recording, replay, and world snapshots.
- sensor
- Port of box3d-cpp-reference/src/sensor.c + sensor.h.
- shape
- solver
- Softness / make_soft and the step context from solver.h. Integration and the serial solve driver live in submodules.
- solver_
set - table
- types
- world
Constants§
- VERSION
- Crate version, exposed so demos and downstream tools can report the exact port build.