Class SimpleMCSweepLineIntersector

Hierarchy: Object , EdgeSetIntersector, SimpleMCSweepLineIntersector
public class SimpleMCSweepLineIntersector
extends EdgeSetIntersector
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.

Other

  • version: 1.7
public SimpleMCSweepLineIntersector()
A SimpleMCSweepLineIntersector creates monotone chains from the edges and compares them using a simple sweep-line along the x-axis.
public void computeIntersections(List edges, SegmentIntersector si, boolean testAllSegments)
public void computeIntersections(List edges0, List edges1, SegmentIntersector si)