- fixed heap bug

This commit is contained in:
granzuglia 2013-10-18 15:32:04 +00:00
parent 6ec773c50a
commit d4cbf8b65d
1 changed files with 6 additions and 2 deletions

View File

@ -73,11 +73,15 @@ public:
if(!m.vert[neightId].IsV()) if(!m.vert[neightId].IsV())
{ {
heap.push_back(WArc(vp,&(m.vert[neightId]))); heap.push_back(WArc(vp,&(m.vert[neightId])));
if(heap.back().w < 0.3f) heap.pop_back(); //std::push_heap(heap.begin(),heap.end());
if(heap.back().w < 0.3f)
heap.pop_back();
else
std::push_heap(heap.begin(),heap.end());
} }
} }
} }
std::push_heap(heap.begin(),heap.end()); //std::push_heap(heap.begin(),heap.end());
} }
/*! \brief parameters for the normal generation /*! \brief parameters for the normal generation
*/ */