From 6dcc5e8a92806959561911d3fefa33bf35ae9611 Mon Sep 17 00:00:00 2001 From: cignoni Date: Thu, 8 May 2008 23:48:00 +0000 Subject: [PATCH] added normalizevertex --- vcg/complex/trimesh/update/normal.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vcg/complex/trimesh/update/normal.h b/vcg/complex/trimesh/update/normal.h index 71d09ddd..18ca35df 100644 --- a/vcg/complex/trimesh/update/normal.h +++ b/vcg/complex/trimesh/update/normal.h @@ -24,6 +24,11 @@ History $Log: not supported by cvs2svn $ +Revision 1.20 2008/04/18 17:52:08 cignoni +added PerVertexFromCurrentFaceNormal +AreaNormalizeFace NormalizeFace +and shortened PerVertexNormalizedPerFaceNormalized + Revision 1.19 2008/02/15 08:08:59 cignoni added missing include matrix33 @@ -206,6 +211,12 @@ static void PerVertexPerFace(ComputeMeshType &m) static void PerVertexNormalizedPerFace(ComputeMeshType &m) { PerVertexPerFace(m); + NormalizeVertex(m); +} + +/// Normalize the lenght of the face normals +static void NormalizeVertex(ComputeMeshType &m) +{ VertexIterator vi; for(vi=m.vert.begin();vi!=m.vert.end();++vi) if( !(*vi).IsD() && (*vi).IsRW() )