From f6388be6000c1c5040f7ac69ce9d8ea2b6c2c1d1 Mon Sep 17 00:00:00 2001 From: cignoni Date: Fri, 5 Dec 2008 22:44:03 +0000 Subject: [PATCH] added VertexSet, the dual of UpdateFlags::VertexClear(bitmask); --- vcg/complex/trimesh/update/flag.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vcg/complex/trimesh/update/flag.h b/vcg/complex/trimesh/update/flag.h index 64d31767..3db5445d 100644 --- a/vcg/complex/trimesh/update/flag.h +++ b/vcg/complex/trimesh/update/flag.h @@ -139,6 +139,14 @@ static void VertexClear(MeshType &m, unsigned int FlagMask = 0xffffffff) if(!(*vi).IsD()) (*vi).Flags() &= andMask ; } +static void VertexSet(MeshType &m, unsigned int FlagMask) +{ + VertexIterator vi; + for(vi=m.vert.begin(); vi!=m.vert.end(); ++vi) + if(!(*vi).IsD()) (*vi).Flags() |= FlagMask ; +} + + static void VertexClearV(MeshType &m) { VertexClear(m,VertexType::VISITED);} static void VertexClearB(MeshType &m) { VertexClear(m,VertexType::BORDER);}