Skip to content

CF_Manifold3

Category: collision
GitHub: cute_math3d.h


Contains all information necessary to resolve a 3d collision.

Struct Members Description
int count The number of points in the manifold (0 to CF_MANIFOLD3_MAX_POINTS).
float depths[CF_MANIFOLD3_MAX_POINTS] The collision depth of each point in the manifold.
CF_V3 contact_points[CF_MANIFOLD3_MAX_POINTS] Contact points, on the contact plane between the shapes.
CF_V3 n Always points from shape A to shape B.

Remarks

The 3d analog of CF_Manifold. A manifold only ever describes shapes that actually touch: count is zero for separated shapes, and every reported point has a non-negative depth. To separate the shapes, move them apart along n by the largest depth.

cf_collide3
cf_sphere_to_sphere_manifold
cf_aabb3_to_aabb3_manifold
cf_capsule3_to_capsule3_manifold