Skip to content

cf_aabb_to_b2

Category: physics
GitHub: cute_physics.h


Converts a CF_Aabb to a b2AABB (bit-identical).

b2AABB cf_aabb_to_b2(CF_Aabb bb) { b2AABB out; out.lowerBound = cf_v2_to_b2(bb.min); out.upperBound = cf_v2_to_b2(bb.max); return out; }

Remarks

Box2D has no AABB shape; for an AABB-shaped collider use b2MakeBox/b2MakeOffsetBox. This converts the bounds type used by queries like b2World_OverlapAABB.

cf_b2_to_aabb
cf_circle_to_b2
cf_poly_to_b2