From 27d9cfd6cb5c5fcbb45137a767affa8c964aee86 Mon Sep 17 00:00:00 2001 From: cignoni Date: Thu, 2 Jun 2011 21:28:50 +0000 Subject: [PATCH] Added VertexFromPlane that put into quality the distance from a plane --- vcg/complex/algorithms/update/quality.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vcg/complex/algorithms/update/quality.h b/vcg/complex/algorithms/update/quality.h index 86da0d09..c6dc7ebd 100644 --- a/vcg/complex/algorithms/update/quality.h +++ b/vcg/complex/algorithms/update/quality.h @@ -230,6 +230,13 @@ static void FaceArea(MeshType &m) (*fi).Q()=vcg::DoubleArea(*fi)/2; } +static void VertexFromPlane(MeshType &m, Plane3 &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;