Added ComputePerFaceQualityMinMax()

This commit is contained in:
Paolo Cignoni 2008-10-14 06:36:25 +00:00
parent d7920e1cc4
commit de8504ba3e
1 changed files with 38 additions and 24 deletions

View File

@ -81,6 +81,20 @@ class Stat
return minmax;
}
static std::pair<float,float> ComputePerFaceQualityMinMax( MeshType & m) // V1.0
{
std::pair<float,float> minmax = std::make_pair(std::numeric_limits<float>::max(),-std::numeric_limits<float>::max());
FaceIterator fi;
for(fi = m.face.begin(); fi != m.face.end(); ++fi)
if(!(*fi).IsD())
{
if( (*fi).Q() < minmax.first) minmax.first =(*fi).Q();
if( (*fi).Q() > minmax.second) minmax.second=(*fi).Q();
}
return minmax;
}
static ScalarType ComputeMeshArea(MeshType & m)
{
ScalarType area=0;