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