Functions
Const sutherlandHodgeman
- sutherlandHodgeman(pts: ReadonlyVec[], bounds: ReadonlyVec[], bc?: ReadonlyVec, eps?: number): ArrayLikeIterable<number>[]
Parameters
pts: ReadonlyVec[]
bounds: ReadonlyVec[]
Optional bc: ReadonlyVec
Default value eps: number = EPS
Returns ArrayLikeIterable<number>[]
Extended version of Sutherland-Hodgeman convex polygon clipping supporting any convex boundary polygon (not only rects). Returns new array of clipped vertices.
https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm