VertexVertexIterator, transverse all the neighboring vertices of a vertex ccwly. More...
#include <iterators.h>

Public Member Functions | |
| VertexVertexIterator (CVertex *v) | |
| ~VertexVertexIterator () | |
| void | operator++ () |
| void | operator++ (int) |
| CVertex * | value () |
| CVertex * | operator* () |
| bool | end () |
| void | reset () |
Private Attributes | |
| CVertex * | m_vertex |
| CHalfEdge * | m_halfedge |
VertexVertexIterator, transverse all the neighboring vertices of a vertex ccwly.
Definition at line 165 of file iterators.h.
| MeshLib::VertexVertexIterator< CVertex, CEdge, CFace, CHalfEdge >::VertexVertexIterator | ( | CVertex * | v | ) | [inline] |
VertexVertexIterator constructor
| v | the current vertex |
Definition at line 172 of file iterators.h.
{
m_vertex = v;
m_halfedge = (CHalfEdge*)m_vertex->most_clw_out_halfedge();
};

| MeshLib::VertexVertexIterator< CVertex, CEdge, CFace, CHalfEdge >::~VertexVertexIterator | ( | ) | [inline] |
| bool MeshLib::VertexVertexIterator< CVertex, CEdge, CFace, CHalfEdge >::end | ( | ) | [inline] |
Indicate whether all the neighboring vertices have been accessed.
Definition at line 302 of file iterators.h.
{ return m_halfedge == NULL; };
| CVertex* MeshLib::VertexVertexIterator< CVertex, CEdge, CFace, CHalfEdge >::operator* | ( | ) | [inline] |
The neighboring vertex, pointed by the current iterator
Definition at line 297 of file iterators.h.
{ return value(); };

| void MeshLib::VertexVertexIterator< CVertex, CEdge, CFace, CHalfEdge >::operator++ | ( | ) | [inline] |
VertexVertexIterator prefix operator ++, goes to the next neighboring vertex CCWly
Definition at line 187 of file iterators.h.
{
assert( m_halfedge != NULL );
if( !m_vertex->boundary() )
{
if( m_halfedge != m_vertex->most_ccw_out_halfedge() )
{
m_halfedge = (CHalfEdge*)m_halfedge->ccw_rotate_about_source();
}
else
{
m_halfedge = NULL;
}
return;
}
if( m_vertex->boundary() )
{
if( m_halfedge == (CHalfEdge*)m_vertex->most_ccw_in_halfedge() )
{
m_halfedge = NULL;
return;
}
CHalfEdge * he = (CHalfEdge*)m_halfedge->ccw_rotate_about_source();
if( he == NULL )
{
m_halfedge = (CHalfEdge*)m_vertex->most_ccw_in_halfedge();
}
else
{
m_halfedge = he;
}
}
return;
};

| void MeshLib::VertexVertexIterator< CVertex, CEdge, CFace, CHalfEdge >::operator++ | ( | int | ) | [inline] |
VertexVertexIterator postfix operator ++, goes to the next neighboring vertex CCWly
Definition at line 231 of file iterators.h.
{
assert( m_halfedge != NULL );
if( !m_vertex->boundary() )
{
if( m_halfedge != (CHalfEdge*)m_vertex->most_ccw_out_halfedge() )
{
m_halfedge = (CHalfEdge*)m_halfedge->ccw_rotate_about_source();
}
else
{
m_halfedge = NULL;
}
return;
}
if( m_vertex->boundary() )
{
if( m_halfedge == (CHalfEdge*)m_vertex->most_ccw_in_halfedge() )
{
m_halfedge = NULL;
return;
}
CHalfEdge * he = (CHalfEdge*)m_halfedge->ccw_rotate_about_source();
if( he == NULL )
{
m_halfedge = (CHalfEdge*)m_vertex->most_ccw_in_halfedge();
}
else
{
m_halfedge = he;
}
}
return;
};

| void MeshLib::VertexVertexIterator< CVertex, CEdge, CFace, CHalfEdge >::reset | ( | ) | [inline] |
Reset the iterator.
Definition at line 307 of file iterators.h.
{ m_halfedge = (CHalfEdge*)m_vertex->most_clw_out_halfedge(); };

| CVertex* MeshLib::VertexVertexIterator< CVertex, CEdge, CFace, CHalfEdge >::value | ( | ) | [inline] |
The neighboring vertex, pointed by the current iterator
Definition at line 275 of file iterators.h.
{
if( !m_vertex->boundary() )
{
return (CVertex*)m_halfedge->target();
}
if( m_halfedge != (CHalfEdge*)m_vertex->most_ccw_in_halfedge() )
{
return (CVertex*)m_halfedge->target();
}
if( m_halfedge == (CHalfEdge*)m_vertex->most_ccw_in_halfedge() )
{
return (CVertex*)m_halfedge->source();
}
return NULL;
};


CHalfEdge* MeshLib::VertexVertexIterator< CVertex, CEdge, CFace, CHalfEdge >::m_halfedge [private] |
Current halfedge.
Definition at line 317 of file iterators.h.
CVertex* MeshLib::VertexVertexIterator< CVertex, CEdge, CFace, CHalfEdge >::m_vertex [private] |
Current vertex
Definition at line 307 of file iterators.h.
1.7.1