public final class IntersectionAlgorithm extends Object
The complexity is O(n log n + s)
where n
is the number of rectangles and s
the number of
intersections.
Modifier and Type | Class and Description |
---|---|
static interface |
IntersectionAlgorithm.IIntersectionHandler
An instance of this interface handles intersections found by the
IntersectionAlgorithm ,. |
Modifier and Type | Method and Description |
---|---|
static void |
intersect(YList objects,
IntersectionAlgorithm.IIntersectionHandler iHandler)
Calculates the intersections of rectangles in the plane.
|
public static final void intersect(YList objects, IntersectionAlgorithm.IIntersectionHandler iHandler)
Every found intersection is reported to an
IntersectionHandler
. Rectangles with negative size are completely ignored by this implementation (i.e. never
generate intersections)
objects
- a list of PlaneObject
objects.iHandler
- intersections are reported to this class.