| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
package org.locationtech.jts.noding; |
| 13 |
|
| 14 |
/** |
| 15 |
* Processes possible intersections detected by a {@link Noder}. |
| 16 |
* The {@link SegmentIntersector} is passed to a {@link Noder}. |
| 17 |
* The {@link SegmentIntersector#processIntersections(SegmentString, int, SegmentString, int)} method is called whenever the {@link Noder} |
| 18 |
* detects that two SegmentStrings <i>might</i> intersect. |
| 19 |
* This class may be used either to find all intersections, or |
| 20 |
* to detect the presence of an intersection. In the latter case, |
| 21 |
* Noders may choose to short-circuit their computation by calling the |
| 22 |
* {@link #isDone()} method. |
| 23 |
* This class is an example of the <i>Strategy</i> pattern. |
| 24 |
* |
| 25 |
* @version 1.7 |
| 26 |
*/ |
| 27 |
public interface SegmentIntersector |
| 28 |
{ |
| 29 |
/** |
| 30 |
* This method is called by clients |
| 31 |
* of the {@link SegmentIntersector} interface to process |
| 32 |
* intersections for two segments of the {@link SegmentString}s being intersected. |
| 33 |
*/ |
| 34 |
void processIntersections( |
| 35 |
SegmentString e0, int segIndex0, |
| 36 |
SegmentString e1, int segIndex1 |
| 37 |
); |
| 38 |
|
| 39 |
/** |
| 40 |
* Reports whether the client of this class |
| 41 |
* needs to continue testing all intersections in an arrangement. |
| 42 |
* |
| 43 |
* @return true if there is no need to continue testing segments |
| 44 |
*/ |
| 45 |
boolean isDone(); |
| 46 |
} |
| 47 |
|