SimpleMCSweepLineIntersector class
Finds all intersections in one or two sets of edges, using an x-axis sweepline algorithm in conjunction with Monotone Chains. While still O(n^2) in the worst case, this algorithm drastically improves the average-case time. The use of MonotoneChains as the items in the index seems to offer an improvement in performance over a sweep-line alone.
@version 1.7
- Inheritance
-
- Object
- EdgeSetIntersector
- SimpleMCSweepLineIntersector
Constructors
- SimpleMCSweepLineIntersector()
- A SimpleMCSweepLineIntersector creates monotone chains from the edges and compares them using a simple sweep-line along the x-axis.
Properties
Methods
-
addEdge(
Edge edge, Object? edgeSet) → void -
addEdges(
List edges) → void -
addEdgesWithSet(
List edges, Object? edgeSet) → void -
computeIntersections(
List edges, SegmentIntersector si, bool testAllSegments) → void -
Computes all self-intersections between edges in a set of edges,
allowing client to choose whether self-intersections are computed.
override
-
computeIntersections1(
SegmentIntersector si) → void -
computeIntersections3(
List edges0, List edges1, SegmentIntersector si) → void -
Computes all mutual intersections between two sets of edges.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prepareEvents(
) → void - Because Delete Events have a link to their corresponding Insert event, it is possible to compute exactly the range of events which must be compared to a given Insert event object.
-
processOverlaps(
int start, int end, SweepLineEvent ev0, SegmentIntersector si) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited