Uses polygonal structure to check for collisions.
Creates a polygon from an array were even numbers are x and odd are y
Array containing the polygon's points.
Creates a regular polygon (edges of same length).
The number of sides in the polygon.
The distance that the vertices are at.
How much the polygon is rotated (in degrees).
new (points : Array<Vector>, origin : Point) : Void
An array of coordinates that define the polygon (must have at least 3).
Pivot point for rotations.
angle : Float
Rotation angle (in degrees) of the polygon (rotates around origin point).
read only maxX : Int
Right x bounding box position.
read only maxY : Int
Bottom y bounding box position.
read only minX : Int
Left x bounding box position.
read only minY : Int
Top y bounding box position.
origin : Point
The polygon rotates around this point when the angle is set.
points : Array<Vector>
The points representing the polygon.
If you need to set a point yourself instead of passing in a new Array