public class InteriorIntersectionFinder extends Object implements SegmentIntersector
SegmentString
s,
if one exists. Only the first intersection found is reported.Constructor and Description |
---|
InteriorIntersectionFinder(LineIntersector li)
Creates an intersection finder which finds an interior intersection
if one exists
|
Modifier and Type | Method and Description |
---|---|
Coordinate |
getInteriorIntersection()
Gets the computed location of the intersection.
|
List |
getIntersections() |
Coordinate[] |
getIntersectionSegments()
Gets the endpoints of the intersecting segments.
|
boolean |
hasIntersection()
Tests whether an 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 |
setCheckEndSegmentsOnly(boolean isCheckEndSegmentsOnly)
Sets whether only end segments should be tested for interior intersection.
|
void |
setFindAllIntersections(boolean findAllIntersections) |
public InteriorIntersectionFinder(LineIntersector li)
li
- the LineIntersector to usepublic void setFindAllIntersections(boolean findAllIntersections)
public List getIntersections()
public void setCheckEndSegmentsOnly(boolean isCheckEndSegmentsOnly)
isCheckEndSegmentsOnly
- whether to test only end segmentspublic boolean hasIntersection()
public Coordinate getInteriorIntersection()
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 © 2016. All rights reserved.