Example for locking vertices in decimater
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1224 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user