| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
package org.locationtech.jts.triangulate.quadedge; |
| 14 |
|
| 15 |
/** |
| 16 |
* Interface for classes which process triangles visited during traversals of a |
| 17 |
* {@link QuadEdgeSubdivision} |
| 18 |
* |
| 19 |
* @author Martin Davis |
| 20 |
*/ |
| 21 |
public interface TraversalVisitor { |
| 22 |
/** |
| 23 |
* Visits a triangle during a traversal of a {@link QuadEdgeSubdivision}. An implementation of |
| 24 |
* this method may perform processing on the current triangle. It must also decide whether a |
| 25 |
* neighbouring triangle should be added to the queue so its neighbours are visited. Often it |
| 26 |
* will perform processing on the neighbour triangle as well, in order to mark it as processed |
| 27 |
* (visited) and/or to determine if it should be visited. Note that choosing <b>not</b> to |
| 28 |
* visit the neighbouring triangle is the terminating condition for many traversal algorithms. |
| 29 |
* In particular, if the neighbour triangle has already been visited, it should not be visited |
| 30 |
* again. |
| 31 |
* |
| 32 |
* @param currTri the current triangle being processed |
| 33 |
* @param edgeIndex the index of the edge in the current triangle being traversed |
| 34 |
* @param neighbTri a neighbouring triangle next in line to visit |
| 35 |
* @return true if the neighbour triangle should be visited |
| 36 |
*/ |
| 37 |
boolean visit(QuadEdgeTriangle currTri, int edgeIndex, QuadEdgeTriangle neighbTri); |
| 38 |
} |
| 39 |
|