From 6f577413583df2380cff4b1b432a993facedee3c Mon Sep 17 00:00:00 2001 From: Mike Kremer Date: Fri, 22 Jan 2010 09:40:45 +0000 Subject: [PATCH] Updated tutorial on deleting geometry. git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@264 fdac6126-5c0c-442c-9429-916003d36597 --- Doc/tutorial_07b.docu | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Doc/tutorial_07b.docu b/Doc/tutorial_07b.docu index e8968f82..0b78bc9a 100644 --- a/Doc/tutorial_07b.docu +++ b/Doc/tutorial_07b.docu @@ -4,7 +4,7 @@ This small example shows how to remove faces and vertices from a mesh. We basically use the geometry created in \ref tutorial_01. -If we want our mesh class to be able to remove vertices, faces or (half-) edges +If we want our mesh class to be able to remove vertices, faces or edges we have to extend the default traits for our mesh class. Vertices, faces and (half-)edges need the OpenMesh::Attributes::Status attribute which is used to hold the flag "deleted" if an element is deleted. @@ -18,6 +18,18 @@ The struct which defines the mesh traits then looks like this: After having created the geometry of the cube one can delete faces and vertices by simply calling delete_vertices() (delete_faces() or delete_edges() respectively). +Note that there is actually no way to delete halfedges directly since they are automatically +affected when the parent edge is marked as deleted! + +The status whether an element is marked as deleted can be requested by + +\code +mesh.status(handle).deleted(); // true if element handle is marked as deleted + // false otherwise +\endcode + +where handle is either a vertex-, edge- or face-handle. + In this example we delete all faces except one and the corresponding vertices. The code looks like this