public static function checkPolygonCollision(polygonA:Array, polygonB:Array):Boolean
Checks if polygon A is intersects polygon B.
As seen on: http://www.codeproject.com/cs/media/PolygonCollision.asp
Parameters
| polygonA:Array — An array of points defining polygon A
|
| |
| polygonB:Array — An array of points defining polygon B
|
Returns
public static function clipPolygon(polygon:Array, viewport:vport):Array
The clipPolygon() function accepts an array of vertices as input and clips the polygon edges against a rectangular clip region.
Turning points are generated when necessary to keep the polygon structure and ensure a correct visualization.
The function generates the resulting polygons in an output array of points.
As seen on http://www.chez.com/pmaillot/2dpclip/2dpclip.htm
Parameters
| polygon:Array |
| |
| viewport:vport |
Returns