Iterator for all triangles around a given vertex.
More...
#include <TriangleAroundVertexIterator.h>
The TriangleAroundVertexIterator iterates over all triangles incident to a given vertex of a Fade_2D instance. The advantage is that the incident triangles can be visited in a certain order, namely counterclockwise with operator++() or clockwise using operator(). If the order is not important you can use Fade_2D::getIncidentTriangles() instead.
Left: the iterator visits the triangles around a vertex in a circular manner. Right: Incrementing/decrementing the iterator at a border triangle makes it point to NULL and another increment/decrement sets it to the next border triangle
◆ TriangleAroundVertexIterator() [1/3]
TriangleAroundVertexIterator::TriangleAroundVertexIterator 
( 
const Point2 * 
pPnt_  ) 


inlineexplicit 
 Parameters

pPnt_  is the vertex whose incident triangles can be visited with the iterator 
Initially the iterator points to an arbitrary triangle (not NULL)
◆ TriangleAroundVertexIterator() [2/3]
TriangleAroundVertexIterator::TriangleAroundVertexIterator 
( 
Point2 * 
pPnt_, 


Triangle2 * 
pTr_ 

) 
 

inline 
 Parameters

pPnt_  is the vertex whose incident triangles can be visited with the iterator 
pTr_  is the triangle the iterator initially points to 
◆ TriangleAroundVertexIterator() [3/3]
◆ operator!=()
Compares the center and the current triangle of *this and rhs
 Returns
 true when they are different, false otherwise
◆ operator*()
Triangle2* TriangleAroundVertexIterator::operator* 
( 
 ) 


inline 
Dereferencing the iterator yields a pointer to the triangle to which the iterator points.
 Warning
 This method might yield NULL at the border of a triangulation.
◆ operator++()
Moves the iterator to the next triangle in counterclockwise order.
 Warning
 At the border of a triangulation, two border edges exist which are incident to the center vertex. Consequently, the neighbor triangles are NULL there. If operator++() leads the iterator off the triangulation then the iterator will point to NULL. Another call to operator++() will set the iterator to the next triangle in counterclockwise order.
◆ operator()
Moves the iterator to the next triangle in clockwise order.
 Warning
 At the border of a triangulation, two border edges are incident to the center vertex. Consequently, the neighbor triangles are NULL there. If operator() leads the iterator off the triangulation then the iterator will point to NULL. Another call to operator() will set the iterator to the next triangle in clockwise order.
◆ operator==()
Compares the center and the current triangle of *this and rhs
 Returns
 true when they are identically or false otherwise
◆ previewNextTriangle()
Triangle2* TriangleAroundVertexIterator::previewNextTriangle 
( 
 ) 


inline 
 Returns
 the next triangle (the one in CCW direction) without changing the current position.
 Warning
 This method might yield NULL at the border of a triangulation.
◆ previewPrevTriangle()
Triangle2* TriangleAroundVertexIterator::previewPrevTriangle 
( 
 ) 


inline 
 Returns
 the previous triangle (the one in CW direction) without changing the current position.
 Warning
 This method might yield NULL at the border of a triangulation.
The documentation for this class was generated from the following file: