Added VertexFromPlane that put into quality the distance from a plane

This commit is contained in:
Paolo Cignoni 2011-06-02 21:28:50 +00:00
parent 11adfa2aff
commit 27d9cfd6cb
1 changed files with 7 additions and 0 deletions

View File

@ -230,6 +230,13 @@ static void FaceArea(MeshType &m)
(*fi).Q()=vcg::DoubleArea(*fi)/2;
}
static void VertexFromPlane(MeshType &m, Plane3<ScalarType> &pl)
{
VertexIterator vi;
for(vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD())
(*vi).Q() =Distance(pl,(*vi).cP());
}
static void VertexFromGaussianCurvature(MeshType &m)
{
VertexIterator vi;