From 059a2f220b265c8e91e76a79ab069e4636ceacc9 Mon Sep 17 00:00:00 2001 From: cignoni Date: Wed, 4 Apr 2012 09:59:10 +0000 Subject: [PATCH] added EdgeCount method for counting selected edges --- vcg/complex/algorithms/update/selection.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vcg/complex/algorithms/update/selection.h b/vcg/complex/algorithms/update/selection.h index 7ab93406..c9a04102 100644 --- a/vcg/complex/algorithms/update/selection.h +++ b/vcg/complex/algorithms/update/selection.h @@ -187,6 +187,15 @@ static size_t FaceCount(MeshType &m) return selCnt; } +static size_t EdgeCount(MeshType &m) +{ + size_t selCnt=0; + EdgeIterator ei; + for(ei=m.edge.begin();ei!=m.edge.end();++ei) + if(!(*ei).IsD() && (*ei).IsS()) ++selCnt; + return selCnt; +} + static size_t VertexCount(MeshType &m) { size_t selCnt=0;