Skip to content

CF_Poly

Category: collision
GitHub: cute_math.h


2D polygon, used for collision detection functions.

Struct Members Description
int count The number of vertices in the polygon, capped at CF_POLY_MAX_VERTS.
CF_V2 verts[CF_POLY_MAX_VERTS] The vertices of the polygon, capped at CF_POLY_MAX_VERTS.
CF_V2 norms[CF_POLY_MAX_VERTS] The normals of the polygon, capped at CF_POLY_MAX_VERTS. Each normal is perpendicular along the poly's surface.

Remarks

Verts are ordered in counter-clockwise order (CCW).

CF_POLY_MAX_VERTS
cf_poly_to_poly_manifold
cf_circle_to_poly
cf_aabb_to_poly
cf_capsule_to_poly
cf_poly_to_poly
cf_ray_to_poly
cf_circle_to_poly_manifold
cf_aabb_to_poly_manifold
cf_capsule_to_poly_manifold