An abstract over an Array of Polygon
instances that define multiple polygonal shapes that can be collision-tested against.
See also:
Variables
Methods
contains(p:Point, isConvex:Bool = false):Bool
Tests if Point p
is inside any of the Polygon instances in Polygons.
Parameters:
p | The point to test against. |
---|---|
isConvex | Use simplified collision test suited for convex polygons. Results are undefined if polygon is concave. |
getBounds(?b:Bounds):Null<Bounds>
Returns bounding box of all Polygon instances in Polygons.
Parameters:
b | Optional Bounds instance to be filled. Returns new Bounds instance if |
---|
getCollider(isConvex:Bool = false):PolygonCollider
Returns new PolygonCollider
instance containing this Polygons.
Parameters:
isConvex | Use simplified collision test suited for convex polygons. Results are undefined if polygon is concave. |
---|