From 7b6feb5db16023419634a0ece77526d4342f6c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 18 Feb 2015 11:38:02 +0000 Subject: [PATCH] Example for locking vertices in decimater git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1224 fdac6126-5c0c-442c-9429-916003d36597 --- Doc/decimater.docu | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Doc/decimater.docu b/Doc/decimater.docu index 9f0f8ddb..fd4c7af1 100644 --- a/Doc/decimater.docu +++ b/Doc/decimater.docu @@ -27,6 +27,24 @@ \attention The decimater sets temporarily the status bit 'tagged' and clears it after usage regardless of a previous state. +\section DecimaterLock Block vertices from beeing touched by the Decimater + You could mark vertices as locked, which should not be modified by the decimater. + + \code + // That might be already requested + mesh_->request_vertex_status(); + + // Get an iterator over all halfedges + Mesh::HalfedgeIter he_it, he_end=mesh_->halfedges_end(); + + // If halfedge is boundary, lock the corresponding vertices + for (he_it = mesh_->halfedges_begin(); he_it != he_end ; ++he_it) + if (mesh_->is_boundary(*he_it) ) { + mesh_->status(_mesh->to_vertex_handle(*he_it)).set_locked(true); + mesh_->status(_mesh->from_vertex_handle(*he_it)).set_locked(true); + } + \endcode + \section DecimaterMod Decimating Modules The vertex to be removed is determined by a decimation module, which has