Small refactoring

This commit is contained in:
Paolo Cignoni 2017-08-31 13:18:16 +02:00
parent 2e139b10a6
commit 7d1431f314
1 changed files with 5 additions and 8 deletions

View File

@ -147,13 +147,10 @@ void Retract(KdTree<ScalarType> &kdtree, MeshType &t)
std::stack<VertexType *> vertStack; std::stack<VertexType *> vertStack;
// Put on the stack all the vertex with just a single incident edge. // Put on the stack all the vertex with just a single incident edge.
for(VertexIterator vi=t.vert.begin();vi!=t.vert.end();++vi) ForEachVertex(t, [&](VertexType &v){
{ if(edge::VEDegree<EdgeType>(&v) ==1)
std::vector<EdgeType *> starVec; vertStack.push(&v);
edge::VEStarVE(&*vi,starVec); });
if(starVec.size()==1)// && !IsBoundaryVertexOnBase(kdtree, vi->cP()))
vertStack.push(&*vi);
}
tri::UpdateFlags<MeshType>::EdgeClearV(t); tri::UpdateFlags<MeshType>::EdgeClearV(t);
tri::UpdateFlags<MeshType>::VertexClearV(t); tri::UpdateFlags<MeshType>::VertexClearV(t);