This class calculates the intersection of rectangles in the plane with the help of a sweep-line algorithm.
The complexity is
O(n log n + s) where
n is the number of rectangles and
s the number of intersections.
public function IntersectionAlgorithm(init:Boolean = true) Parameters | init:Boolean (default = true) |
protected static function createXStruct(objects:YList):YList
Initializes the sweep line data structures from a set of objects.
Parameters
Returnsoverride public function getClass():ClassReturns protected final function initIntersectionAlgorithm():void public static function intersect(objects:YList, iHandler:IntersectionAlgorithm_IntersectionHandler):void
Calculates the intersections of rectangles in the plane.
Every found intersection is reported to an IntersectionHandler. Rectangles with negative size are completely ignored by this implementation (i.e. never generate intersections)
Parameters
public static function newIntersectionAlgorithm():IntersectionAlgorithmReturns
Wed Oct 7 2015, 04:43 PM +02:00