Minimal refactoring of mesh intersection

This commit is contained in:
Paolo Cignoni 2017-04-05 07:40:17 +02:00
parent 95d88a7af9
commit d4293c7d78
1 changed files with 9 additions and 10 deletions

View File

@ -147,9 +147,8 @@ bool IntersectionPlaneMesh(TriMeshType & m,
typename TriMeshType::template PerVertexAttributeHandle < ScalarType > qH =
tri::Allocator<TriMeshType> :: template AddPerVertexAttribute < ScalarType >(m,"TemporaryPlaneDistance");
typename TriMeshType::VertexIterator vi;
for(vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD())
qH[vi] =SignedDistancePlanePoint(pl,(*vi).cP());
for(auto vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD())
qH[vi] = SignedDistancePlanePoint(pl,(*vi).cP());
for(size_t i=0;i<m.face.size();i++)
if(!m.face[i].IsD())