public class SimpleMCSweepLineIntersector extends EdgeSetIntersector
Modifier and Type | Field and Description |
---|---|
(package private) java.util.List |
events |
(package private) int |
nOverlaps |
Constructor and Description |
---|
SimpleMCSweepLineIntersector()
A SimpleMCSweepLineIntersector creates monotone chains from the edges
and compares them using a simple sweep-line along the x-axis.
|
Modifier and Type | Method and Description |
---|---|
private void |
addEdge(Edge edge,
java.lang.Object edgeSet) |
private void |
addEdges(java.util.List edges) |
private void |
addEdges(java.util.List edges,
java.lang.Object edgeSet) |
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.
|
private void |
computeIntersections(SegmentIntersector si) |
private void |
prepareEvents()
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.
|
private void |
processOverlaps(int start,
int end,
SweepLineEvent ev0,
SegmentIntersector si) |
public SimpleMCSweepLineIntersector()
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
private void addEdges(java.util.List edges)
private void addEdges(java.util.List edges, java.lang.Object edgeSet)
private void addEdge(Edge edge, java.lang.Object edgeSet)
private void prepareEvents()
private void computeIntersections(SegmentIntersector si)
private void processOverlaps(int start, int end, SweepLineEvent ev0, SegmentIntersector si)