Added ComputeMeshArea

This commit is contained in:
Paolo Cignoni 2008-05-27 21:35:26 +00:00
parent 6bb1ea8fcc
commit cd7d4b5053
1 changed files with 13 additions and 0 deletions

View File

@ -81,6 +81,19 @@ class Stat
return minmax;
}
static ScalarType ComputeMeshArea(MeshType & m)
{
ScalarType area=0;
FaceIterator fi;
for(fi = m.face.begin(); fi != m.face.end(); ++fi)
if(!(*fi).IsD())
area += DoubleArea(*fi);
return area/ScalarType(2.0);
}
static void ComputePerVertexQualityHistogram( MeshType & m, Histogramf &h) // V1.0
{
VertexIterator vi;