Skip to main content

Crate boxddd

Crate boxddd 

Source
Expand description

Safe, ergonomic Rust bindings for Box3D.

The crate wraps the primary Box3D simulation APIs with Rust-owned value types, builders, recoverable try_* methods, and callback panic containment. Low-level process-global hooks and raw void* user data stay outside the ordinary safe API; APIs with an explicit policy live under boxddd::raw and are not re-exported by the prelude.

See the repository’s docs/api-coverage.md for the tested upstream API coverage inventory.

Re-exports§

pub use body::BodyDef;
pub use body::BodyDefBuilder;
pub use body::BodyType;
pub use callbacks::MaterialMixInput;
pub use collision::BoxCastInput;
pub use collision::CastOutput;
pub use collision::CollisionPlane;
pub use collision::DistanceInput;
pub use collision::DistanceOutput;
pub use collision::LocalManifold;
pub use collision::PlaneSolverResult;
pub use collision::RayCastInput;
pub use collision::ShapeCastInput;
pub use collision::ShapeCastPairInput;
pub use collision::ShapeProxy;
pub use collision::Sweep;
pub use collision::TimeOfImpactInput;
pub use collision::TimeOfImpactOutput;
pub use collision::TimeOfImpactState;
pub use collision::clip_vector;
pub use collision::collide_capsule_and_sphere;
pub use collision::collide_capsule_and_triangle;
pub use collision::collide_capsules;
pub use collision::collide_hull_and_capsule;
pub use collision::collide_hull_and_sphere;
pub use collision::collide_hull_and_triangle;
pub use collision::collide_hulls;
pub use collision::collide_sphere_and_triangle;
pub use collision::collide_spheres;
pub use collision::compute_capsule_aabb;
pub use collision::compute_capsule_mass;
pub use collision::compute_compound_aabb;
pub use collision::compute_height_field_aabb;
pub use collision::compute_hull_aabb;
pub use collision::compute_hull_mass;
pub use collision::compute_mesh_aabb;
pub use collision::compute_sphere_aabb;
pub use collision::compute_sphere_mass;
pub use collision::get_sweep_transform;
pub use collision::overlap_capsule;
pub use collision::overlap_compound;
pub use collision::overlap_height_field;
pub use collision::overlap_hull;
pub use collision::overlap_mesh;
pub use collision::overlap_sphere;
pub use collision::ray_cast_capsule;
pub use collision::ray_cast_compound;
pub use collision::ray_cast_height_field;
pub use collision::ray_cast_hollow_sphere;
pub use collision::ray_cast_hull;
pub use collision::ray_cast_mesh;
pub use collision::ray_cast_sphere;
pub use collision::shape_cast_capsule;
pub use collision::shape_cast_compound;
pub use collision::shape_cast_height_field;
pub use collision::shape_cast_hull;
pub use collision::shape_cast_mesh;
pub use collision::shape_cast_pair;
pub use collision::shape_cast_sphere;
pub use collision::shape_distance;
pub use collision::solve_planes;
pub use collision::sweep_transform;
pub use collision::time_of_impact;
pub use debug_draw::DebugCompoundChild;
pub use debug_draw::DebugDraw;
pub use debug_draw::DebugDrawCommand;
pub use debug_draw::DebugDrawDiagnostic;
pub use debug_draw::DebugDrawFrame;
pub use debug_draw::DebugDrawOptions;
pub use debug_draw::DebugHullFace;
pub use debug_draw::DebugMesh;
pub use debug_draw::DebugMeshTriangle;
pub use debug_draw::DebugShape;
pub use debug_draw::DebugShapeAsset;
pub use debug_draw::DebugShapeEvent;
pub use debug_draw::DebugShapeGeometry;
pub use debug_draw::DebugShapeHandle;
pub use debug_draw::HexColor;
pub use dynamic_tree::DynamicTree;
pub use dynamic_tree::DynamicTreeBoxCastHit;
pub use dynamic_tree::DynamicTreeCastControl;
pub use dynamic_tree::DynamicTreeClosestHit;
pub use dynamic_tree::DynamicTreeClosestResult;
pub use dynamic_tree::DynamicTreeFilter;
pub use dynamic_tree::DynamicTreeHit;
pub use dynamic_tree::DynamicTreeProxy;
pub use dynamic_tree::DynamicTreeProxyId;
pub use dynamic_tree::DynamicTreeRayCastHit;
pub use error::ApiError;
pub use error::ApiResult;
pub use error::Error;
pub use error::Result;
pub use events::BodyMoveEvent;
pub use events::BodyMoveIter;
pub use events::ContactBeginIter;
pub use events::ContactBeginTouch;
pub use events::ContactBeginTouchEvent;
pub use events::ContactEndIter;
pub use events::ContactEndTouch;
pub use events::ContactEndTouchEvent;
pub use events::ContactEvents;
pub use events::ContactHit;
pub use events::ContactHitEvent;
pub use events::ContactHitIter;
pub use events::JointEvent;
pub use events::JointEventIter;
pub use events::SensorBeginIter;
pub use events::SensorBeginTouch;
pub use events::SensorBeginTouchEvent;
pub use events::SensorEndIter;
pub use events::SensorEndTouch;
pub use events::SensorEndTouchEvent;
pub use events::SensorEvents;
pub use joints::DistanceJointDef;
pub use joints::FilterJointDef;
pub use joints::JointTuning;
pub use joints::JointType;
pub use joints::MotorJointDef;
pub use joints::ParallelJointDef;
pub use joints::PrismaticJointDef;
pub use joints::RevoluteJointDef;
pub use joints::SphericalJointDef;
pub use joints::WeldJointDef;
pub use joints::WheelJointDef;
pub use query::BodyCastHit;
pub use query::BodyClosestPoint;
pub use query::MoverPlane;
pub use query::QueryFilter;
pub use query::QueryHit;
pub use query::RayHit;
pub use query::ShapeRayHit;
pub use query::TreeStats;
pub use recording::RecPlayer;
pub use recording::RecPlayerInfo;
pub use recording::RecQueryHit;
pub use recording::RecQueryInfo;
pub use recording::RecQueryType;
pub use recording::Recording;
pub use recording::ReplayWorldId;
pub use recording::validate_replay_bytes;
pub use shapes::BoxHull;
pub use shapes::Capsule;
pub use shapes::Compound;
pub use shapes::CompoundBuilder;
pub use shapes::CompoundBytes;
pub use shapes::CompoundCapsule;
pub use shapes::CompoundChild;
pub use shapes::CompoundChildShape;
pub use shapes::CompoundHull;
pub use shapes::CompoundMesh;
pub use shapes::CompoundQueryHit;
pub use shapes::CompoundSphere;
pub use shapes::HEIGHT_FIELD_HOLE;
pub use shapes::HeightField;
pub use shapes::HeightFieldBuilder;
pub use shapes::Hull;
pub use shapes::MAX_COMPOUND_MESH_MATERIALS;
pub use shapes::MeshData;
pub use shapes::MeshDataBuilder;
pub use shapes::MeshDataOptions;
pub use shapes::MeshTriangleHit;
pub use shapes::ScaledBox;
pub use shapes::ShapeDef;
pub use shapes::ShapeDefBuilder;
pub use shapes::ShapeHeightField;
pub use shapes::ShapeHull;
pub use shapes::ShapeMesh;
pub use shapes::ShapeType;
pub use shapes::Sphere;
pub use shapes::SurfaceMaterial;
pub use types::Aabb;
pub use types::BodyId;
pub use types::Capacity;
pub use types::ContactData;
pub use types::ContactId;
pub use types::CosSin;
pub use types::Counters;
pub use types::Filter;
pub use types::JointId;
pub use types::Manifold;
pub use types::ManifoldPoint;
pub use types::MassData;
pub use types::Matrix3;
pub use types::MotionLocks;
pub use types::Plane;
pub use types::Pos;
pub use types::Profile;
pub use types::Quat;
pub use types::SegmentDistanceResult;
pub use types::ShapeId;
pub use types::Transform;
pub use types::Vec2;
pub use types::Vec3;
pub use types::Version;
pub use types::WorldTransform;
pub use types::closest_point_on_segment;
pub use types::compute_cos_sin;
pub use types::deterministic_atan2;
pub use types::is_valid_float;
pub use types::line_distance;
pub use types::segment_distance;
pub use types::steiner_inertia;
pub use world::ExplosionDef;
pub use world::ExplosionDefBuilder;
pub use world::World;
pub use world::WorldDef;
pub use world::WorldDefBuilder;
pub use world::allocated_byte_count;
pub use world::is_double_precision;
pub use world::version;

Modules§

body
Body definitions, body types, and body builder types.
callbacks
World callback adapters for custom filtering and material mixing.
collision
Standalone collision, cast, overlap, distance, manifold, and plane helpers.
debug_draw
Collected debug draw commands and debug draw option types.
dynamic_tree
Standalone broad-phase dynamic tree wrapper.
error
Error and result types returned by the safe wrapper.
events
Body, contact, joint, and sensor event snapshots read from a world.
joints
Joint definitions and joint-specific world APIs.
prelude
Common imports for applications using boxddd.
query
World, body, shape, and tree query result types.
raw
Explicit raw interop boundary for APIs that expose native Box3D concepts. Explicit raw interop boundary for Box3D APIs that cannot be made ordinary safe Rust APIs.
recording
Recording and replay support for Box3D simulation traces.
shapes
Shape descriptors, native resource owners, and shape data builders.
types
Value types for ids, math, contacts, stats, filters, and transforms. Shared value types re-exported by the crate root.
world
World creation, stepping, body APIs, shape APIs, and global metadata.

Structs§

TaskSystem
Safe task-system adapter installed on a Box3D world definition.
TaskSystemStats
Snapshot of a TaskSystem’s task counters.