added ComputePerEdgeQualityMinMax

This commit is contained in:
Nico Pietroni 2015-11-23 23:39:32 +00:00
parent f66fed8c6a
commit 2b367da917
1 changed files with 15 additions and 0 deletions

View File

@ -99,6 +99,21 @@ public:
return minmax;
}
static std::pair<ScalarType,ScalarType> ComputePerEdgeQualityMinMax( MeshType & m)
{
tri::RequirePerEdgeQuality(m);
std::pair<ScalarType,ScalarType> minmax = std::make_pair(std::numeric_limits<ScalarType>::max(),-std::numeric_limits<ScalarType>::max());
EdgeIterator ei;
for(ei = m.edge.begin(); ei != m.edge.end(); ++ei)
if(!(*ei).IsD())
{
if( (*ei).Q() < minmax.first) minmax.first =(*ei).Q();
if( (*ei).Q() > minmax.second) minmax.second=(*ei).Q();
}
return minmax;
}
/**
\short compute the barycenter of the surface thin-shell.
E.g. it assume a 'empty' model where all the mass is located on the surface and compute the barycenter of that thinshell.