diff --git a/vcg/complex/local_optimization.h b/vcg/complex/local_optimization.h index 6ce8d214..d172f626 100644 --- a/vcg/complex/local_optimization.h +++ b/vcg/complex/local_optimization.h @@ -22,6 +22,9 @@ ****************************************************************************/ /**************************************************************************** $Log: not supported by cvs2svn $ + Revision 1.3 2004/07/27 09:46:15 cignoni + First working version of the LocalOptimization/Simplification Framework + Revision 1.1 2004/07/15 12:04:14 ganovelli minor changes @@ -58,7 +61,7 @@ class LocalModification public: LocalModification(){}; - ~LocalModification(){}; + virtual ~LocalModification(){}; /// return the type of operation virtual ModifierType IsOfType() = 0 ; @@ -206,9 +209,9 @@ public: start=clock(); nPerfmormedOps =0; - int i=0; + while( !GoalReached() && !h.empty()) - {int size = h.size(); + { std::pop_heap(h.begin(),h.end()); LocModPtrType locMod = h.back().locModPtr; h.pop_back(); diff --git a/vcg/complex/trimesh/edge_collapse.h b/vcg/complex/trimesh/edge_collapse.h index aa59e4ec..07fe7ca8 100644 --- a/vcg/complex/trimesh/edge_collapse.h +++ b/vcg/complex/trimesh/edge_collapse.h @@ -44,7 +44,7 @@ class EdgeCollapse { public: /// The tetrahedral mesh type - typedef typename TRI_MESH_TYPE TriMeshType; + typedef TRI_MESH_TYPE TriMeshType; /// The tetrahedron type typedef typename TriMeshType::FaceType FaceType; /// The vertex type @@ -151,12 +151,12 @@ class EdgeCollapse const int ADJ_E = TriMeshType::VertexType::NewBitFlag(); //enum {ADJ_1= MeshType::VertexType::USER0, // ADJ_E= MeshType::VertexType::USER0<<1} ; - const int ALLADJ = ADJ_1|ADJ_E; + // const int ALLADJ = ADJ_1|ADJ_E; const int NOTALLADJ = ~(ADJ_1 | ADJ_E | TriMeshType::VertexType::VISITED); const int NOTALLADJ1 = ~(ADJ_E | TriMeshType::VertexType::VISITED); //EdgePosB x; - vcg::face::VFIterator x; + typename vcg::face::VFIterator x; // Clear visited and adj flag for all vertices adj to v0; for(x.f = pos.V(0)->VFp(), x.z = pos.V(0)->VFi(); x.f!=0; ++x ) { x.f->V1(x.z)->Flags() &= NOTALLADJ; @@ -204,7 +204,7 @@ class EdgeCollapse int DoCollapse(PosType & c, Point3 p) { FindSets(c); - VFIVec::iterator i; + typename VFIVec::iterator i; int n_face_del =0 ; //set Face Face topology @@ -278,4 +278,4 @@ class EdgeCollapse } } -#endif \ No newline at end of file +#endif