public class SegmentIntersectionDetector extends Object implements SegmentIntersector
SegmentString
s,
if one exists. Only a single intersection is recorded.
This strategy can be configured to search for proper intersections.
In this case, the presence of any kind of intersection will still be recorded,
but searching will continue until either a proper intersection has been found
or no intersections are detected.Constructor and Description |
---|
SegmentIntersectionDetector(LineIntersector li)
Creates an intersection finder
|
Modifier and Type | Method and Description |
---|---|
Coordinate |
getIntersection()
Gets the computed location of the intersection.
|
Coordinate[] |
getIntersectionSegments()
Gets the endpoints of the intersecting segments.
|
boolean |
hasIntersection()
Tests whether an intersection was found.
|
boolean |
hasNonProperIntersection()
Tests whether a non-proper intersection was found.
|
boolean |
hasProperIntersection()
Tests whether a proper intersection was found.
|
boolean |
isDone()
Reports whether the client of this class
needs to continue testing all intersections in an arrangement.
|
void |
processIntersections(SegmentString e0,
int segIndex0,
SegmentString e1,
int segIndex1)
This method is called by clients
of the
SegmentIntersector class to process
intersections for two segments of the SegmentString s being intersected. |
void |
setFindAllIntersectionTypes(boolean findAllTypes) |
void |
setFindProper(boolean findProper) |
public SegmentIntersectionDetector(LineIntersector li)
li
- the LineIntersector to usepublic void setFindProper(boolean findProper)
public void setFindAllIntersectionTypes(boolean findAllTypes)
public boolean hasIntersection()
public boolean hasProperIntersection()
public boolean hasNonProperIntersection()
public Coordinate getIntersection()
public Coordinate[] getIntersectionSegments()
public void processIntersections(SegmentString e0, int segIndex0, SegmentString e1, int segIndex1)
SegmentIntersector
class to process
intersections for two segments of the SegmentString
s being intersected.
Note that some clients (such as MonotoneChain
s) may optimize away
this call for segment pairs which they have determined do not intersect
(e.g. by an disjoint envelope test).processIntersections
in interface SegmentIntersector
public boolean isDone()
SegmentIntersector
isDone
in interface SegmentIntersector
Copyright © 2013. All rights reserved.