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