Skip to content

PolygonDecomposition

Defined in: physics/polygonDecompose2D.ts:244

What a collider ring collides as, once Box2D’s two constraints are applied. Shared with every caller that asks about the same ring, so treat it as frozen.

degenerate: boolean

Defined in: physics/polygonDecompose2D.ts:249

The ring crosses itself, so no partition of it exists: pieces is the convex hull, which is what the solver falls back to.


readonly pieces: readonly Vec2[][]

Defined in: physics/polygonDecompose2D.ts:246

Convex pieces, each counter-clockwise and within the solver’s vertex cap.