public class SegmentIntersector
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Collection[] |
bdyNodes |
private boolean |
hasIntersection
These variables keep track of what types of intersections were
found during ALL edges that have been intersected.
|
private boolean |
hasProper |
private boolean |
hasProperInterior |
private boolean |
includeProper |
private boolean |
isDone |
private boolean |
isDoneWhenProperInt |
private boolean |
isSelfIntersection |
private LineIntersector |
li |
private int |
numIntersections |
int |
numTests |
private Coordinate |
properIntersectionPoint |
private boolean |
recordIsolated |
Constructor and Description |
---|
SegmentIntersector(LineIntersector li,
boolean includeProper,
boolean recordIsolated) |
Modifier and Type | Method and Description |
---|---|
void |
addIntersections(Edge e0,
int segIndex0,
Edge e1,
int segIndex1)
This method is called by clients of the EdgeIntersector class to test for and add
intersections for two segments of the edges being intersected.
|
Coordinate |
getProperIntersectionPoint() |
boolean |
hasIntersection() |
boolean |
hasProperInteriorIntersection()
A proper interior intersection is a proper intersection which is not
contained in the set of boundary nodes set for this SegmentIntersector.
|
boolean |
hasProperIntersection()
A proper intersection is an intersection which is interior to at least two
line segments.
|
static boolean |
isAdjacentSegments(int i1,
int i2) |
private boolean |
isBoundaryPoint(LineIntersector li,
java.util.Collection[] bdyNodes) |
private boolean |
isBoundaryPointInternal(LineIntersector li,
java.util.Collection bdyNodes) |
boolean |
isDone() |
private boolean |
isTrivialIntersection(Edge e0,
int segIndex0,
Edge e1,
int segIndex1)
A trivial intersection is an apparent self-intersection which in fact
is simply the point shared by adjacent line segments.
|
void |
setBoundaryNodes(java.util.Collection bdyNodes0,
java.util.Collection bdyNodes1) |
void |
setIsDoneIfProperInt(boolean isDoneWhenProperInt) |
private boolean hasIntersection
private boolean hasProper
private boolean hasProperInterior
private Coordinate properIntersectionPoint
private LineIntersector li
private boolean includeProper
private boolean recordIsolated
private boolean isSelfIntersection
private int numIntersections
public int numTests
private java.util.Collection[] bdyNodes
private boolean isDone
private boolean isDoneWhenProperInt
public SegmentIntersector(LineIntersector li, boolean includeProper, boolean recordIsolated)
public static boolean isAdjacentSegments(int i1, int i2)
public void setBoundaryNodes(java.util.Collection bdyNodes0, java.util.Collection bdyNodes1)
public void setIsDoneIfProperInt(boolean isDoneWhenProperInt)
public boolean isDone()
public Coordinate getProperIntersectionPoint()
null
if none was foundpublic boolean hasIntersection()
public boolean hasProperIntersection()
public boolean hasProperInteriorIntersection()
private boolean isTrivialIntersection(Edge e0, int segIndex0, Edge e1, int segIndex1)
public void addIntersections(Edge e0, int segIndex0, Edge e1, int segIndex1)
private boolean isBoundaryPoint(LineIntersector li, java.util.Collection[] bdyNodes)
private boolean isBoundaryPointInternal(LineIntersector li, java.util.Collection bdyNodes)