From 91cbd0047f90550142a92e238907507140ca40f7 Mon Sep 17 00:00:00 2001 From: cignoni Date: Thu, 12 Jul 2007 23:11:35 +0000 Subject: [PATCH] added the missing PerVertexNormalizedPerFaceNormalized --- vcg/complex/trimesh/update/normal.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/vcg/complex/trimesh/update/normal.h b/vcg/complex/trimesh/update/normal.h index cc334ec8..a85d0245 100644 --- a/vcg/complex/trimesh/update/normal.h +++ b/vcg/complex/trimesh/update/normal.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.13 2007/01/10 17:25:14 matteodelle +*** empty log message *** + Revision 1.12 2006/11/07 15:13:56 zifnab1974 Necessary changes for compilation with gcc 3.4.6. Especially the hash function is a problem @@ -161,12 +164,18 @@ static void PerVertexPerFace(ComputeMeshType &m) /// The normal of a vertex v is the weigthed average of the normals of the faces incident on v. static void PerVertexNormalizedPerFace(ComputeMeshType &m) { -PerVertexPerFace(m); - VertexIterator vi; - for(vi=m.vert.begin();vi!=m.vert.end();++vi) - if( !(*vi).IsD() && (*vi).IsRW() ) - (*vi).N().Normalize(); + PerVertexPerFace(m); + VertexIterator vi; + for(vi=m.vert.begin();vi!=m.vert.end();++vi) + if( !(*vi).IsD() && (*vi).IsRW() ) + (*vi).N().Normalize(); } +static void PerVertexNormalizedPerFaceNormalized(ComputeMeshType &m) +{ + PerVertexNormalizedPerFace(m); + FaceIterator fi; + for(fi=m.face.begin();fi!=m.face.end();++fi) + if( !(*fi).IsD() ) (*fi).N().Normalize();} static void PerFaceRW(ComputeMeshType &m, bool normalize=false) {