Skip to main content

Module manifold

Module manifold 

Source
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§

FeaturePair
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)
LocalManifold
A local manifold with no dynamic information. Used by collide functions.
LocalManifoldPoint
A local manifold point and normal in frame A. (b3LocalManifoldPoint)
Manifold
A contact manifold describes the contact points between colliding shapes. (b3Manifold)
ManifoldPoint
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§

FeatureOwner
Which shape owns a clipped feature edge. (b3FeatureOwner)
SeparatingFeature
Cached separating axis feature. (b3SeparatingFeature)
TriangleFeature
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)