diff --git a/Doc/Examples/circulator_functions.cc b/Doc/Examples/circulator_functions.cc new file mode 100644 index 00000000..d43dc4c7 --- /dev/null +++ b/Doc/Examples/circulator_functions.cc @@ -0,0 +1,34 @@ +/************************************************** + * Vertex circulators + **************************************************/ + +// Get the vertex-vertex circulator (1-ring) of vertex _vh +VertexVertexIter OpenMesh::PolyConnectivity::vv_iter (VertexHandle _vh); + +// Get the vertex-incoming halfedges circulator of vertex _vh +VertexIHalfedgeIter OpenMesh::PolyConnectivity::vih_iter (VertexHandle _vh); + +// Get the vertex-outgoing halfedges circulator of vertex _vh +VertexOHalfedgeIter OpenMesh::PolyConnectivity::voh_iter (VertexHandle _vh); + +// Get the vertex-edge circulator of vertex _vh +VertexEdgeIter OpenMesh::PolyConnectivity::ve_iter (VertexHandle _vh); + +// Get the vertex-face circulator of vertex _vh +VertexFaceIter OpenMesh::PolyConnectivity::vf_iter (VertexHandle _vh); + +/************************************************** + * Face circulators + **************************************************/ + +// Get the face-vertex circulator of face _fh +FaceVertexIter OpenMesh::PolyConnectivity::fv_iter (FaceHandle _fh); + +// Get the face-halfedge circulator of face _fh +FaceHalfedgeIter OpenMesh::PolyConnectivity::fh_iter (FaceHandle _fh); + +// Get the face-edge circulator of face _fh +FaceEdgeIter OpenMesh::PolyConnectivity::fe_iter (FaceHandle _fh); + +// Get the face-face circulator of face _fh +FaceFaceIter OpenMesh::PolyConnectivity::ff_iter (FaceHandle _fh); diff --git a/Doc/mesh.docu b/Doc/mesh.docu index 59b1cbad..781e26a5 100644 --- a/Doc/mesh.docu +++ b/Doc/mesh.docu @@ -717,7 +717,6 @@ MyMesh::VertexIter instead of \c OpenMesh::Iterators::VertexIterT. - \subsection subsec_iterators Linear Iterators The linear iterators are used to enumerate all mesh items, e.g. for @@ -782,14 +781,26 @@ i.e. it takes a mesh and the handle of the item to iterate around. All circulators provide the operations listed in -OpenMesh::Concepts::CirculatorT, which are basically the same as the +CirculatorT, which are basically the same as the iterator funtions. Furthermore, circulators provide \c operator \c bool(), which returns true, as long as the circulator hasn't reached the end of the sequence. -Example: The following code enumerates the 1-ring of each vertex: +%OpenMesh provides the following functions (defined in OpenMesh::PolyConnectivity) +to get circulators around a specified center item: + +\include circulator_functions.cc + +Note that for every circulator there also exists a constant version. +To make use of these constant circulators just add the prefix
+"Const" to the type specifier and add the prefix "c" to the function used to request +the circulator of an item. Example:
+ +ConstVertexVertexIter cvvit = mesh.cvv_iter(some_vertex_handle); + +The following code example now shows how to enumerate the 1-ring of each vertex: \include circulators.cc