Changed per vertex nomal computation to works with polygons

This commit is contained in:
Nico Pietroni 2014-11-05 19:24:46 +00:00
parent 7dd839a8eb
commit 505fa04c73
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ static void PerVertexClear(ComputeMeshType &m, bool ClearAllVertNormal=false)
//typename FaceType::NormalType t = (*f).Normal(); //typename FaceType::NormalType t = (*f).Normal();
typename FaceType::NormalType t = vcg::Normal(*f); 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() ) if( !(*f).V(j)->IsD() && (*f).V(j)->IsRW() )
(*f).V(j)->N() += t; (*f).V(j)->N() += t;
} }