Significant Change: Now the importer compute the bbox. All the importer should do.

This commit is contained in:
Paolo Cignoni 2013-09-11 11:10:19 +00:00
parent 80467d1f41
commit 646a31972f
1 changed files with 35 additions and 36 deletions

View File

@ -991,17 +991,16 @@ static int Open( OpenMeshType &m, const char * filename, PlyInfo &pi )
// vn and fn should be correct but if someone wrongly saved some deleted elements they can be wrong. // vn and fn should be correct but if someone wrongly saved some deleted elements they can be wrong.
m.vn = 0; m.vn = 0;
VertexIterator vi; for(VertexIterator vi=m.vert.begin();vi!=m.vert.end();++vi)
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
if( ! (*vi).IsD() ) if( ! (*vi).IsD() )
++m.vn; ++m.vn;
m.fn = 0; m.fn = 0;
FaceIterator fi; for(FaceIterator fi=m.face.begin();fi!=m.face.end();++fi)
for(fi=m.face.begin();fi!=m.face.end();++fi)
if( ! (*fi).IsD() ) if( ! (*fi).IsD() )
++m.fn; ++m.fn;
tri::UpdateBounding<OpenMeshType>::Box(m);
return 0; return 0;
} }