JTS Topology Suite version 1.12

com.vividsolutions.jts.triangulate.quadedge
Interface TraversalVisitor


public interface TraversalVisitor

Interface for classes which process triangles visited during travesals of a QuadEdgeSubdivision

Author:
Martin Davis

Method Summary
 boolean visit(QuadEdgeTriangle currTri, int edgeIndex, QuadEdgeTriangle neighbTri)
          Visits a triangle during a traversal of a QuadEdgeSubdivision.
 

Method Detail

visit

boolean visit(QuadEdgeTriangle currTri,
              int edgeIndex,
              QuadEdgeTriangle neighbTri)
Visits a triangle during a traversal of a QuadEdgeSubdivision. An implementation of this method may perform processing on the current triangle. It must also decide whether a neighbouring triangle should be added to the queue so its neighbours are visited. Often it will perform processing on the neighbour triangle as well, in order to mark it as processed (visited) and/or to determine if it should be visited. Note that choosing not to visit the neighbouring triangle is the terminating condition for many traversal algorithms. In particular, if the neighbour triangle has already been visited, it should not be visited again.

Parameters:
currTri - the current triangle being processed
edgeIndex - the index of the edge in the current triangle being traversed
neighbTri - a neighbouring triangle next in line to visit
Returns:
true if the neighbour triangle should be visited

JTS Topology Suite version 1.12