removed a useless loop in the update cycle of the heap of the edges to be collapesed. Stupid bug pointed out by Enrico (thanks!)
This commit is contained in:
parent
794f2f27a7
commit
2b9a9f2be2
|
|
@ -134,7 +134,7 @@ public:
|
|||
|
||||
inline void UpdateHeap(HeapType & h_ret, BaseParameterClass *pp)
|
||||
{
|
||||
GlobalMark()++; int nn=0;
|
||||
GlobalMark()++;
|
||||
VertexType *v[2];
|
||||
v[0]= pos.V(0);v[1]=pos.V(1);
|
||||
v[1]->IMark() = GlobalMark();
|
||||
|
|
@ -153,8 +153,6 @@ public:
|
|||
while (!vfi.End())
|
||||
{
|
||||
assert(!vfi.F()->IsD());
|
||||
for (int j=0;j<3;j++)
|
||||
{
|
||||
if( !(vfi.V1()->IsV()) && (vfi.V1()->IsRW()))
|
||||
{
|
||||
vfi.V1()->SetV();
|
||||
|
|
@ -176,19 +174,16 @@ public:
|
|||
}
|
||||
}
|
||||
// if(vfi.V1()->IsRW() && vfi.V2()->IsRW() )
|
||||
// {
|
||||
// h_ret.push_back(HeapElem(new MYTYPE(EdgeType(vfi.V1(),vfi.V2()),this->GlobalMark())));
|
||||
// std::push_heap(h_ret.begin(),h_ret.end());
|
||||
// if(IsSymmetric()){
|
||||
// h_ret.push_back(HeapElem(new MYTYPE(EdgeType(vfi.V2(),vfi.V1()), this->GlobalMark())));
|
||||
// std::push_heap(h_ret.begin(),h_ret.end());
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
++vfi;nn++;
|
||||
}
|
||||
// printf("ADDED %d\n",nn);
|
||||
// {
|
||||
// h_ret.push_back(HeapElem(new MYTYPE(EdgeType(vfi.V1(),vfi.V2()),this->GlobalMark())));
|
||||
// std::push_heap(h_ret.begin(),h_ret.end());
|
||||
// if(IsSymmetric()){
|
||||
// h_ret.push_back(HeapElem(new MYTYPE(EdgeType(vfi.V2(),vfi.V1()), this->GlobalMark())));
|
||||
// std::push_heap(h_ret.begin(),h_ret.end());
|
||||
// }
|
||||
// }
|
||||
++vfi;
|
||||
} // end while
|
||||
}
|
||||
|
||||
ModifierType IsOfType(){ return TriEdgeCollapseOp;}
|
||||
|
|
|
|||
|
|
@ -472,8 +472,6 @@ public:
|
|||
while (!vfi.End())
|
||||
{
|
||||
assert(!vfi.F()->IsD());
|
||||
for (int j=0;j<3;j++)
|
||||
{
|
||||
if( !(vfi.V1()->IsV()) && vfi.V1()->IsRW())
|
||||
{
|
||||
vfi.V1()->SetV();
|
||||
|
|
@ -503,13 +501,13 @@ public:
|
|||
std::push_heap(h_ret.begin(),h_ret.end());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
++vfi;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void InitQuadric(TriMeshType &m,BaseParameterClass *_pp)
|
||||
static void InitQuadric(TriMeshType &m,BaseParameterClass *_pp)
|
||||
{
|
||||
QParameter *pp=(QParameter *)_pp;
|
||||
typename TriMeshType::FaceIterator pf;
|
||||
|
|
|
|||
Loading…
Reference in New Issue