#![allow(rustdoc::broken_intra_doc_links)]
#[doc = "Body definitions, body types, and body builder types."]
pub mod body;
#[doc = "World callback adapters for custom filtering and material mixing."]
pub mod callbacks;
#[doc = "Standalone collision, cast, overlap, distance, manifold, and plane helpers."]
pub mod collision;
mod core {
pub(crate) mod callback_state;
pub(crate) mod debug_checks;
pub(crate) mod ffi_vec;
pub(crate) mod foundation;
pub(crate) mod material_mix_registry;
pub(crate) mod provenance;
pub(crate) mod task_system;
pub(crate) mod units;
pub(crate) mod validation;
pub(crate) mod wasm;
}
#[doc = "Collected debug draw commands and debug draw option types."]
pub mod debug_draw;
#[doc = "Standalone broad-phase dynamic tree wrapper."]
pub mod dynamic_tree;
#[doc = "Error and result types returned by the safe wrapper."]
pub mod error;
#[doc = "Body, contact, joint, and sensor event snapshots read from a world."]
pub mod events;
#[cfg(any(feature = "mint", feature = "glam", feature = "nalgebra"))]
mod interop;
#[doc = "Joint definitions and joint-specific world APIs."]
pub mod joints;
#[doc = "Common imports for applications using `boxddd`."]
pub mod prelude;
#[doc = "World, body, shape, and tree query result types."]
pub mod query;
#[doc = "Explicit raw interop boundary for APIs that expose native Box3D concepts."]
pub mod raw;
#[doc = "Recording and replay support for Box3D simulation traces."]
pub mod recording;
#[doc = "Shape descriptors, native resource owners, and shape data builders."]
pub mod shapes;
#[doc = "Value types for ids, math, contacts, stats, filters, and transforms."]
pub mod types;
#[doc = "World creation, stepping, body APIs, shape APIs, and global metadata."]
pub mod world;
pub use body::{BodyDef, BodyDefBuilder, BodyType};
pub use callbacks::MaterialMixInput;
pub use collision::{
BoxCastInput, CastOutput, CollisionPlane, DistanceInput, DistanceOutput, LocalManifold,
PlaneSolverResult, RayCastInput, ShapeCastInput, ShapeCastPairInput, ShapeProxy, Sweep,
TimeOfImpactInput, TimeOfImpactOutput, TimeOfImpactState, clip_vector,
collide_capsule_and_sphere, collide_capsules, collide_hull_and_capsule,
collide_hull_and_sphere, collide_hulls, collide_spheres, collide_triangle_and_capsule,
collide_triangle_and_hull, collide_triangle_and_sphere, compute_capsule_aabb,
compute_capsule_mass, compute_compound_aabb, compute_height_field_aabb, compute_hull_aabb,
compute_hull_mass, compute_mesh_aabb, compute_sphere_aabb, compute_sphere_mass,
get_sweep_transform, overlap_capsule, overlap_compound, overlap_height_field, overlap_hull,
overlap_mesh, overlap_sphere, ray_cast_capsule, ray_cast_compound, ray_cast_height_field,
ray_cast_hollow_sphere, ray_cast_hull, ray_cast_mesh, ray_cast_sphere, shape_cast_capsule,
shape_cast_compound, shape_cast_height_field, shape_cast_hull, shape_cast_mesh,
shape_cast_pair, shape_cast_sphere, shape_distance, solve_planes, sweep_transform,
time_of_impact,
};
pub use core::foundation::{Foundation, FoundationActivity, FoundationConfig, StallThreshold};
pub use core::task_system::{TaskSystem, TaskSystemStats};
pub use debug_draw::{
DebugCompoundChild, DebugDraw, DebugDrawCommand, DebugDrawDiagnostic, DebugDrawFrame,
DebugDrawOptions, DebugHullFace, DebugMesh, DebugMeshTriangle, DebugShapeAsset,
DebugShapeEvent, DebugShapeGeometry, DebugShapeHandle, HexColor,
};
pub use dynamic_tree::{
DynamicTree, DynamicTreeBoxCastHit, DynamicTreeCastControl, DynamicTreeClosestHit,
DynamicTreeClosestResult, DynamicTreeFilter, DynamicTreeHit, DynamicTreeProxy,
DynamicTreeProxyId, DynamicTreeRayCastHit,
};
pub use error::{Error, Result};
pub use events::{
BodyMoveEvent, BodyMoveIter, ContactBeginIter, ContactBeginTouch, ContactBeginTouchEvent,
ContactEndIter, ContactEndTouch, ContactEndTouchEvent, ContactEvents, ContactHit,
ContactHitEvent, ContactHitIter, JointEvent, JointEventIter, SensorBeginIter, SensorBeginTouch,
SensorBeginTouchEvent, SensorEndIter, SensorEndTouch, SensorEndTouchEvent, SensorEvents,
};
pub use joints::{
DistanceJointDef, FilterJointDef, JointTuning, JointType, MotorJointDef, ParallelJointDef,
PrismaticJointDef, RevoluteJointDef, SphericalJointDef, WeldJointDef, WheelJointDef,
};
pub use query::{
BodyCastHit, BodyClosestPoint, MoverPlane, QueryFilter, QueryHit, RayHit, ShapeRayHit,
TreeStats,
};
pub use recording::{
RecPlayer, RecPlayerInfo, RecQueryHit, RecQueryInfo, RecQueryType, Recording, RecordingSession,
ReplayWorldId,
};
pub use shapes::{
BoxHull, Capsule, Compound, CompoundBuilder, CompoundBytes, CompoundCapsule, CompoundChild,
CompoundChildShape, CompoundHull, CompoundMesh, CompoundQueryHit, CompoundSphere,
HEIGHT_FIELD_HOLE, HeightField, HeightFieldBuilder, Hull, MAX_COMPOUND_MESH_MATERIALS,
MeshData, MeshDataBuilder, MeshDataOptions, MeshTriangleHit, ScaledBox, ShapeDef,
ShapeDefBuilder, ShapeHeightField, ShapeHull, ShapeMesh, ShapeType, Sphere, SurfaceMaterial,
};
pub use types::{
Aabb, BodyId, Capacity, ContactData, ContactId, CosSin, Counters, Filter, JointId, Manifold,
ManifoldPoint, MassData, Matrix3, MotionLocks, Plane, Pos, Profile, Quat,
SegmentDistanceResult, ShapeId, Transform, Vec2, Vec3, Version, WorldTransform,
closest_point_on_segment, compute_cos_sin, deterministic_atan2, is_valid_float, line_distance,
segment_distance, steiner_inertia,
};
pub use world::{
ExplosionDef, ExplosionDefBuilder, StepOutcome, World, WorldDef, WorldDefBuilder,
allocated_byte_count, is_double_precision, version,
};
#[doc(hidden)]
pub mod __private {
pub struct CallbackGuard {
_guard: crate::core::callback_state::CallbackGuard,
}
pub fn enter_callback_guard_for_test() -> CallbackGuard {
CallbackGuard {
_guard: crate::core::callback_state::CallbackGuard::enter(),
}
}
pub fn task_system_panic_on_enqueue_for_test() -> crate::TaskSystem {
crate::TaskSystem::__panic_on_enqueue_for_test()
}
pub fn task_system_panic_on_task_for_test() -> crate::TaskSystem {
crate::TaskSystem::__panic_on_task_for_test()
}
pub fn task_system_panic_on_finish_for_test() -> crate::TaskSystem {
crate::TaskSystem::__panic_on_finish_for_test()
}
pub fn task_system_check_callback_guard_for_test() -> crate::TaskSystem {
crate::TaskSystem::__check_callback_guard_for_test()
}
pub fn task_system_guard_rejections_for_test(task_system: &crate::TaskSystem) -> usize {
task_system.__guard_rejections_for_test()
}
pub fn force_next_replay_restore_mismatch_for_test() {
crate::core::units::force_next_restore_mismatch_for_test();
}
pub fn defer_replay_drop_for_test(player: crate::RecPlayer) -> crate::FoundationActivity {
let owner_frame = crate::core::callback_state::OwnerCallFrame::enter();
let callback_guard = crate::core::callback_state::CallbackGuard::enter();
drop(player);
drop(callback_guard);
let activity = crate::Foundation::get()
.expect("test replay player requires an initialized Foundation")
.activity();
drop(owner_frame);
activity
}
}