Skip to main content

Module polygon

Module polygon 

Source

Structsยง

HalfSpace ๐Ÿ”’
Points kept by clipper are the ones with normal . point >= offset
Polygon ๐Ÿ”’
Convex polygon of the intersection, kept on the stack: this runs once per element per interface

Constantsยง

MAX_POLYGON_VERTICES ๐Ÿ”’
A tetra cut by a plane gives at most 4 vertices, and clipping a convex polygon by a half space adds at most one, so four bounds can never take it past 8