added updateQuality Vertex Clamp

This commit is contained in:
Paolo Cignoni 2010-03-18 14:20:29 +00:00
parent 3256d9517c
commit 3b770c935a
1 changed files with 9 additions and 0 deletions

View File

@ -207,6 +207,15 @@ static void VertexConstant(MeshType &m, float q)
(*vi).Q()=q;
}
/** Clamp each vertex of the mesh with a range of values.
*/
static void VertexClamp(MeshType &m, float qmin, float qmax)
{
VertexIterator vi;
for(vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD())
(*vi).Q()=std::min(qmax, std::max(qmin,(*vi).Q()));
}
/** Assign to each face of the mesh a constant quality value. Useful for initialization.
*/
static void FaceConstant(MeshType &m, float q)