|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.geom.IntersectionAlgorithm
public class IntersectionAlgorithm
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.
Nested Class Summary | |
---|---|
static interface |
IntersectionAlgorithm.IntersectionHandler
An instance of this interface handles intersections found by the IntersectionAlgorithm , |
Constructor Summary | |
---|---|
IntersectionAlgorithm()
|
Method Summary | |
---|---|
protected static YList |
createXStruct(YList objects)
Initializes the sweep line data structures from a set of objects. |
static void |
intersect(YList objects,
IntersectionAlgorithm.IntersectionHandler iHandler)
Calculates the intersections of rectangles in the plane. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntersectionAlgorithm()
Method Detail |
---|
public static void intersect(YList objects, IntersectionAlgorithm.IntersectionHandler iHandler)
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.protected static YList createXStruct(YList objects)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |