Interface ITraversalVisitor
Interface for classes which process triangles visited during traversals of a QuadEdgeSubdivision
Namespace: NetTopologySuite.Triangulate.QuadEdge
Assembly: NetTopologySuite.dll
Syntax
public interface ITraversalVisitor
Methods
| Edit this page View SourceVisit(QuadEdgeTriangle, int, QuadEdgeTriangle)
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.
Declaration
bool Visit(QuadEdgeTriangle currTri, int edgeIndex, QuadEdgeTriangle neighbTri)
Parameters
Type | Name | Description |
---|---|---|
QuadEdgeTriangle | currTri | the current triangle being processed |
int | edgeIndex | the index of the edge in the current triangle being traversed |
QuadEdgeTriangle | neighbTri | a neighbouring triangle next in line to visit |
Returns
Type | Description |
---|---|
bool | true if the neighbour triangle should be visited |