mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-20 03:16:10 +00:00
Added Normalization step to the bent normal
This commit is contained in:
parent
2153bb1834
commit
a2f5cc658c
@ -284,13 +284,16 @@ bool AmbientOcclusionPlugin::processGL(MeshModel &m, vector<Point3f> &posVect)
|
||||
{
|
||||
tri::UpdateColor<CMeshO>::FaceQualityGray(m.cm);
|
||||
CMeshO::FaceIterator fi;
|
||||
for(fi=m.cm.face.begin();fi!=m.cm.face.end();++fi) if(!(*fi).IsD())
|
||||
for(fi=m.cm.face.begin();fi!=m.cm.face.end();++fi)
|
||||
(*fi).Q()=(*fi).Q()/numViews;
|
||||
} else {
|
||||
tri::UpdateColor<CMeshO>::VertexQualityGray(m.cm);
|
||||
CMeshO::VertexIterator vi;
|
||||
for(vi=m.cm.vert.begin();vi!=m.cm.vert.end();++vi) if(!(*vi).IsD())
|
||||
for(vi=m.cm.vert.begin();vi!=m.cm.vert.end();++vi)
|
||||
{
|
||||
(*vi).Q()=(*vi).Q()/numViews;
|
||||
BN[vi].Normalize();
|
||||
}
|
||||
}
|
||||
|
||||
Log(0,"Successfully calculated A.O. after %3.2f sec, %3.2f of which is due to initialization", ((float)tAll.elapsed()/1000.0f), ((float)tInitElapsed/1000.0f) );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user