From ae4cbf0d46d04548b81d85350518a80f440b0a88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Mon, 10 Oct 2011 12:24:43 +0000 Subject: [PATCH] Document skipping iterators git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@424 fdac6126-5c0c-442c-9429-916003d36597 --- Doc/mesh.docu | 41 +++++++++++++++++++------- src/OpenMesh/Core/Mesh/CirculatorsT.hh | 6 ++-- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/Doc/mesh.docu b/Doc/mesh.docu index 58d07025..8842c7d3 100644 --- a/Doc/mesh.docu +++ b/Doc/mesh.docu @@ -585,9 +585,9 @@ documentation (see \ref mesh_kernels_group). Therefore your mesh provides the pubic member functions of @@ -615,13 +615,15 @@ finally step three will show you how to add your own modules to IOManager. For a quick start you can copy the following code directly to your project. -\b Note: If you link statically against OpenMesh, you have to add the define +\note + \include mesh_io.cc @@ -713,6 +715,7 @@ provided by %OpenMesh which can be found in the IO subdirectory. - \ref it_iters - \ref it_iters_h +- \ref it_iters_skipping - \ref it_circs - \ref it_circs_h @@ -752,9 +755,15 @@ Additionally to the standard operations, each linear iterator provides a method \c handle(), which returns the handle of the item referred to by the iterator. -\note An iterator to an item usually needs more memory than a +\note + \section it_iters_h How to use iterators in OpenMesh @@ -771,6 +780,18 @@ for(MyMesh::FaceIter f_it = mesh.faces_begin(); f_it != mesh.faces_end(); ++f_it \endcode +\section it_iters_skipping Skipping Iterators +All iterators are also available as skipping iterators. If elements are deleted on a mesh, +the standard iterators go over all elements, even deleted ones(which are available until +a garbage_collection is done). The skipping iterators ignore these elements. You can retrieve +a skipping iterator by calling one of the following functions: + +\arg \c vertices_sbegin(), +\arg \c edges_sbegin(), +\arg \c halfedges_sbegin(), +\arg \c faces_sbegin() + +The ends for these iterators are equal to the standard iterator ends (e.g. \c vertices_end() ). \section it_circs Circulators diff --git a/src/OpenMesh/Core/Mesh/CirculatorsT.hh b/src/OpenMesh/Core/Mesh/CirculatorsT.hh index 5ae7b848..185d8f58 100644 --- a/src/OpenMesh/Core/Mesh/CirculatorsT.hh +++ b/src/OpenMesh/Core/Mesh/CirculatorsT.hh @@ -2132,9 +2132,9 @@ class FaceVertexIterT /// Equal ? bool operator==(const FaceVertexIterT& _rhs) const { return ((mesh_ == _rhs.mesh_) && - (start_ == _rhs.start_) && - (heh_ == _rhs.heh_) && - (lap_counter_ == _rhs.lap_counter_)); + (start_ == _rhs.start_) && + (heh_ == _rhs.heh_) && + (lap_counter_ == _rhs.lap_counter_)); }