From 505fa04c73c1f23515d87651b5e9f63e103e65bf Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Wed, 5 Nov 2014 19:24:46 +0000 Subject: [PATCH] Changed per vertex nomal computation to works with polygons --- vcg/complex/algorithms/update/normal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcg/complex/algorithms/update/normal.h b/vcg/complex/algorithms/update/normal.h index 376ce35b..73d02982 100644 --- a/vcg/complex/algorithms/update/normal.h +++ b/vcg/complex/algorithms/update/normal.h @@ -96,7 +96,7 @@ static void PerVertexClear(ComputeMeshType &m, bool ClearAllVertNormal=false) //typename FaceType::NormalType t = (*f).Normal(); typename FaceType::NormalType t = vcg::Normal(*f); - for(int j=0; j<3; ++j) + for(int j=0; j<(*f).VN(); ++j) if( !(*f).V(j)->IsD() && (*f).V(j)->IsRW() ) (*f).V(j)->N() += t; }