Expand description
Collision detection algorithms including broad-phase and narrow-phase.
Provides broadphase (brute force, sweep-and-prune, BVH), narrowphase (GJK, EPA, specialized sphere/box/capsule tests), and contact manifold generation.
Re-exports§
pub use types::CollisionEvent;pub use types::CollisionFilter;pub use types::CollisionPair;pub use types::Contact;pub use types::ContactManifold;pub use types::FeatureId;pub use types::MAX_CONTACTS;pub use types::PhysicsMaterial;pub use types::RichContact;pub use types::RichContactManifold;pub use broadphase::BroadPhase;pub use broadphase::BruteForceBroadPhase;pub use broadphase::BvhBroadphase;pub use broadphase::SweepAndPrune;pub use dbvt::BvhAabb;pub use dbvt::DynamicBvh;pub use narrowphase::BatchNarrowPhase;pub use narrowphase::ContactFilter;pub use narrowphase::NarrowPhaseContact;pub use narrowphase::ShapeKind;pub use narrowphase::shape_shape_contact;pub use narrowphase::Epa;pub use narrowphase::Gjk;pub use narrowphase::NarrowPhaseDispatcher;pub use ccd::CcdBodyEntry;pub use ccd::CcdPair;pub use ccd::CcdPipeline;pub use ccd::CcdPipelineConfig;pub use ccd::ConservativeAdvancement;pub use ccd::RigidBodyState;pub use ccd::ToiResult;pub use ccd::advance_body_to;pub use ccd::integrate_angular;pub use ccd::integrate_linear;pub use ccd::quat_mul;pub use ccd::quat_normalize;pub use ccd::quat_rotate;pub use ccd::slerp_quat;pub use ccd::time_of_impact;pub use sweep::RayHit;pub use sweep::SweepResult;pub use sweep::aabb_aabb_overlap;pub use sweep::point_aabb_dist_sq;pub use sweep::ray_aabb;pub use sweep::ray_sphere;pub use sweep::ray_triangle;pub use sweep::sphere_aabb_overlap;pub use sweep::swept_aabb_aabb;pub use sweep::swept_sphere_aabb;pub use sweep::swept_sphere_sphere;pub use gjk_epa::ConvexShape;pub use gjk_epa::EpaFace;pub use gjk_epa::EpaResult;pub use gjk_epa::GjkBox;pub use gjk_epa::GjkCapsule;pub use gjk_epa::GjkSphere;pub use gjk_epa::Simplex;pub use gjk_epa::add3;pub use gjk_epa::cross3;pub use gjk_epa::do_simplex;pub use gjk_epa::dot3;pub use gjk_epa::epa;pub use gjk_epa::gjk_distance;pub use gjk_epa::gjk_epa_contact;pub use gjk_epa::gjk_intersect;pub use gjk_epa::len3;pub use gjk_epa::minkowski_support;pub use gjk_epa::normalize3;pub use gjk_epa::scale3;pub use gjk_epa::sub3;pub use contact_graph::ContactCache;pub use contact_graph::ContactGraph;pub use contact_graph::ContactKey;pub use contact_graph::PersistedContact;pub use contact_graph::SpeculativeContact;pub use contact_graph::speculative_contact;pub use contact_graph::speculative_impulse;pub use manifold_cache::CachingStrategy;pub use manifold_cache::ContactIsland;pub use manifold_cache::ContactManifoldCache;pub use manifold_cache::ContactPointId;pub use manifold_cache::ManifoldCompressor;pub use manifold_cache::ManifoldLifetimeManager;pub use manifold_cache::ManifoldMetrics;pub use manifold_cache::ManifoldPointMatcher;pub use manifold_cache::ManifoldReduction;pub use manifold_cache::PersistentManifold;pub use manifold_cache::age_cache_warm_start;pub use manifold_cache::age_manifold_warm_start;pub use manifold_cache::age_warm_start;pub use manifold_cache::apply_position_corrections;pub use manifold_cache::baumgarte_correction;pub use manifold_cache::baumgarte_correction_slop;pub use manifold_cache::build_contact_islands;pub use manifold_cache::compute_manifold_metrics;pub use manifold_cache::find_match_with_strategy;pub use sat_collision::Capsule as SatCapsule;pub use sat_collision::ContactFeature;pub use sat_collision::ContactManifoldBuilder;pub use sat_collision::ConvexPolyhedraSat;pub use sat_collision::ConvexPolyhedron;pub use sat_collision::ConvexPolytope;pub use sat_collision::Obb;pub use sat_collision::ObbBvh;pub use sat_collision::ObbBvhNode;pub use sat_collision::ObbCapsuleCollision;pub use sat_collision::ObbCollision;pub use sat_collision::ObbTree;pub use sat_collision::ObbTriangleCollision;pub use sat_collision::PolyhedraContact;pub use sat_collision::PolytopeCollision;pub use sat_collision::SatAxisCache;pub use sat_collision::SatContact;pub use sat_collision::SatContactPointGenerator;pub use sat_collision::closest_points_on_segments;pub use sat_collision::edge_edge_contact;pub use sat_collision::obb_bvh_pair_query;pub use sat_collision::obb_overlap_on_axis;pub use sat_collision::obb_project;pub use recast::RecastBuilder;pub use recast::RecastConfig;pub use recast::RecastError;
Modules§
- broadphase
- Auto-generated module structure
- ccd
- Continuous Collision Detection (CCD) via conservative advancement.
- compound_
shapes - Compound and complex shape handling for collision detection.
- contact_
generation - Advanced contact manifold generation for collision detection.
- contact_
graph - Contact graph persistence and speculative contacts.
- contact_
manifold - Contact manifold generation and management.
- dbvt
- Auto-generated module structure
- deformable_
collision - Auto-generated module structure
- fluid_
collision - Fluid-solid collision and coupling for the OxiPhysics collision crate.
- gjk_
enhanced - Auto-generated module structure
- gjk_epa
- GJK (Gilbert-Johnson-Keerthi) and EPA (Expanding Polytope Algorithm)
for convex shape collision detection using plain
[f64; 3]arrays. - gjk_
extended - Extended GJK/EPA algorithms.
- joint_
collision - Joint-limit collision: revolute, prismatic, and ball-socket angle limits modelled as constraints. Covers soft/hard stops, gear-ratio response, cable/chain limits, articulated-body joint stops, motor hard limits, joint friction as a constraint, compliance at limits, and warm-starting.
- kdtree_
collision - KD-tree based spatial queries and collision detection.
- manifold_
cache - Persistent contact manifold caching and warm-starting for stable simulation. Persistent contact manifold caching for stable simulation.
- mesh_
collision - Mesh collision detection: BVH for triangle meshes (AABB tree build/query), triangle-triangle intersection (Möller-Trumbore), mesh-mesh broad+narrow phase, deformable mesh collision (BVH refit), cloth self-collision, continuous collision detection for deformables, proximity query (distance field), swept triangle vs static mesh, penetration depth estimation, and contact manifold generation.
- narrowphase
- Auto-generated module structure
- parallel_
collision - Auto-generated module structure
- proximity
- Proximity query algorithms for collision detection.
- proximity_
query - Advanced proximity queries for collision detection.
- query
- Auto-generated module structure
- ray_
casting - Auto-generated module structure
- recast
- Recast-equivalent navmesh construction from triangle soup.
- sap
- Auto-generated module structure
- sat_
collision - Separating Axis Theorem (SAT) collision detection for OBBs and convex shapes. Auto-generated module structure
- shape_
cast - Shape casting (continuous collision detection / swept queries).
- soft_
body_ collision - Soft body and cloth collision detection and response.
- softbody_
collision - Soft body collision detection: deformable meshes, cloth, self-collision.
- spatial_
queries - Advanced spatial queries.
- sweep
- Swept-primitive collision queries.
- terrain_
collision - Auto-generated module structure
- types
- Core collision detection types.
- voxel_
collision - Voxel-based collision detection.
Structs§
- Contextual
Collector - Like
ErrorCollectorbut storesContextualErrorvalues. - Contextual
Error - An
Errordecorated with the body-pair indices that triggered it. - Error
Budget - Tracks per-category error budgets for rate-limited triage.
- Error
Collector - Collects multiple non-fatal errors so the caller can inspect them in bulk after a simulation step, rather than short-circuiting on the first failure.
- Error
Stats - Accumulates error counts per kind and severity for a simulation step.
- Retry
Policy - Specifies how many times a failed collision query should be retried.
Enums§
- Error
- Main error type for the collision module.
- Error
Kind - Coarse classification of
Errorvariants for programmatic branching. - Recovery
Hint - Suggested recovery action for a failed collision query.
- Severity
- Severity level for runtime triage and logging.
Type Aliases§
- Result
- Result type alias.