added EdgeCount method for counting selected edges

This commit is contained in:
Paolo Cignoni 2012-04-04 09:59:10 +00:00
parent 06d481f5de
commit 059a2f220b
1 changed files with 9 additions and 0 deletions

View File

@ -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;