|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.geometry.iso.topograph2D.index.EdgeSetIntersector
org.geotools.geometry.iso.topograph2D.index.SimpleMonotoneChainSweepLineIntersector
public class SimpleMonotoneChainSweepLineIntersector
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.
Constructor Summary | |
---|---|
SimpleMonotoneChainSweepLineIntersector()
A SimpleMCSweepLineIntersector creates monotone chains from the edges and compares them using a simple sweep-line along the x-axis. |
Method Summary | |
---|---|
void |
computeIntersections(java.util.List edges0,
java.util.List edges1,
SegmentIntersector si)
Computes all mutual intersections between two sets of edges. |
void |
computeIntersections(java.util.List edges,
SegmentIntersector si,
boolean testAllSegments)
Computes all self-intersections between edges in a set of edges, allowing client to choose whether self-intersections are computed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleMonotoneChainSweepLineIntersector()
Method Detail |
---|
public void computeIntersections(java.util.List edges, SegmentIntersector si, boolean testAllSegments)
EdgeSetIntersector
computeIntersections
in class EdgeSetIntersector
edges
- a list of edges to test for intersectionssi
- the SegmentIntersector to usetestAllSegments
- true if self-intersections are to be tested as wellpublic void computeIntersections(java.util.List edges0, java.util.List edges1, SegmentIntersector si)
EdgeSetIntersector
computeIntersections
in class EdgeSetIntersector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |