@immugio/three-math-extensions / Exports / Polygon
- boundingBox
- center
- centerOnOrigin
- clone
- ensureLastPoint
- equals
- flip
- toBoundingPolygon
- toRectangle
- fromPoints
- fromSize
• new Polygon(contour
, holes?
): Polygon
Name | Type |
---|---|
contour |
Vec2 [] |
holes? |
Vec2 [][] |
• contour: Vec2
[]
• Optional
holes: Vec2
[][]
• get
size(): Vec2
▸ boundingBox(): BoundingBox
▸ center(): Vec2
▸ centerOnOrigin(): Polygon
▸ clone(): Polygon
▸ ensureLastPoint(): Polygon
▸ equals(other
): boolean
Name | Type |
---|---|
other |
Polygon |
boolean
▸ flip(): Polygon
▸ toBoundingPolygon(): Polygon
▸ toRectangle(): Rectangle
▸ fromPoints(contour
, holes?
): Polygon
Name | Type |
---|---|
contour |
Point2 [] |
holes? |
Point2 [][] |
▸ fromSize(width
, height
): Polygon
Name | Type |
---|---|
width |
number |
height |
number |