Expand description
Contact manifold generation for convex primitive pairs and mesh narrow phase.
Port of box3d-cpp-reference/src/convex_manifold.c (sphere / capsule / hull
pairs), triangle_manifold.c, plus the clip/edge helpers from
manifold.h / manifold.c. Mesh contact assembly lives in contact/mesh_contact.rs.
SPDX-FileCopyrightText: 2025 Erin Catto SPDX-License-Identifier: MIT
Structs§
- Feature
Pair - Contact points are always the result of two edges intersecting. It can be two edges of the same shape, which is just a shape vertex. Or a contact point can be the result of two edges crossing from different shapes. (b3FeaturePair)
- Local
Manifold - A local manifold with no dynamic information. Used by collide functions.
- Local
Manifold Point - A local manifold point and normal in frame A. (b3LocalManifoldPoint)
- Manifold
- A contact manifold describes the contact points between colliding shapes. (b3Manifold)
- Manifold
Point - A manifold point is a contact point belonging to a contact manifold. Box3D uses speculative collision so some contact points may be separated. (b3ManifoldPoint)
- SatCache
- Separating axis test cache. Provides temporal acceleration of collision routines. (b3SATCache)
Enums§
- Feature
Owner - Which shape owns a clipped feature edge. (b3FeatureOwner)
- Separating
Feature - Cached separating axis feature. (b3SeparatingFeature)
- Triangle
Feature - Cached triangle feature for mesh/height-field contacts. (b3TriangleFeature)
Constants§
- FEATURE_
PAIR_ SINGLE - For single point contact, such as sphere-sphere, sphere-capsule, sphere-triangle. (b3FeaturePair_single)
Functions§
- collide_
capsule_ and_ sphere - Collide a capsule and a sphere. (b3CollideCapsuleAndSphere)
- collide_
capsule_ and_ triangle - Collide a capsule and a triangle. (b3CollideCapsuleAndTriangle)
- collide_
capsules - Collide two capsules. (b3CollideCapsules)
- collide_
hull_ and_ capsule - Collide a hull and a capsule. (b3CollideHullAndCapsule)
- collide_
hull_ and_ sphere - Collide a hull and a sphere. (b3CollideHullAndSphere)
- collide_
hull_ and_ triangle - Collide a hull and a triangle in the local space of the hull. (b3CollideHullAndTriangle)
- collide_
hulls - Collide two convex hulls. (b3CollideHulls)
- collide_
sphere_ and_ triangle - Collide a sphere and a triangle. (b3CollideSphereAndTriangle)
- collide_
spheres - Collide two spheres. (b3CollideSpheres)
- edge_
edge_ separation - Edge-edge separation along the common normal. (b3EdgeEdgeSeparation)
- find_
incident_ face - Find the incident face given a reference normal and closest vertex. (b3FindIncidentFace)
- flip_
pair - Flip a feature pair so face-A / face-B reference choice does not change ids. (b3FlipPair)
- make_
feature_ id - Pack a feature pair into a 32-bit id. (b3MakeFeatureId)
- make_
feature_ pair - Build a feature pair. (b3MakeFeaturePair)