From 2896499a4bd12594f8fd8f74985e8ba8f7533b77 Mon Sep 17 00:00:00 2001 From: cignoni Date: Mon, 9 Oct 2006 20:09:40 +0000 Subject: [PATCH] Changed some access to VertexFaceIterator to reflect the shorter new operators. --- .../local_optimization/tri_edge_collapse.h | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/vcg/complex/local_optimization/tri_edge_collapse.h b/vcg/complex/local_optimization/tri_edge_collapse.h index 71dd633a..c7653190 100644 --- a/vcg/complex/local_optimization/tri_edge_collapse.h +++ b/vcg/complex/local_optimization/tri_edge_collapse.h @@ -22,6 +22,9 @@ ****************************************************************************/ /**************************************************************************** $Log: not supported by cvs2svn $ + Revision 1.17 2005/10/12 10:44:01 cignoni + Now creation of new edge use Ordered() constructor to comply the fact that the basic collapse is simmetric. + Revision 1.16 2005/01/19 10:35:28 cignoni Better management of symmetric/asymmetric edge collapses @@ -72,7 +75,7 @@ namespace tri{ /// This is the base class of all the specialized collapse classes like for example Quadric Edge Collapse. /// Each derived class -template +template class TriEdgeCollapse: public LocalOptimization::LocModType , public EdgeCollapse { public: @@ -104,7 +107,7 @@ protected: typedef typename LocalOptimization::HeapElem HeapElem; typedef typename LocalOptimization::HeapType HeapType; -TriMeshType *mt; + TriMeshType *mt; ///the pair to collapse EdgeType pos; @@ -171,8 +174,8 @@ public: // First loop around the remaining vertex to unmark visited flags vcg::face::VFIterator vfi(v[1]->VFp(),v[1]->VFi()); while (!vfi.End()){ - vfi.F()->V1(vfi.I())->ClearV(); - vfi.F()->V2(vfi.I())->ClearV(); + vfi.V1()->ClearV(); + vfi.V2()->ClearV(); ++vfi; } @@ -184,19 +187,19 @@ public: assert(!vfi.F()->IsD()); for (int j=0;j<3;j++) { - if( !(vfi.F()->V1(vfi.I())->IsV()) && (vfi.F()->V1(vfi.I())->IsRW())) + if( !(vfi.V1()->IsV()) && (vfi.V1()->IsRW())) { vfi.F()->V1(vfi.I())->SetV(); - h_ret.push_back(HeapElem(new MYTYPE(EdgeType::OrderedEdge(vfi.F()->V(vfi.I()),vfi.F()->V1(vfi.I())),GlobalMark()))); + h_ret.push_back(HeapElem(new MYTYPE(EdgeType::OrderedEdge( vfi.V(),vfi.V1() ),GlobalMark()))); std::push_heap(h_ret.begin(),h_ret.end()); if(this->IsSymmetric()){ - h_ret.push_back(HeapElem(new MYTYPE(EdgeType::OrderedEdge(vfi.F()->V1(vfi.I()),vfi.F()->V(vfi.I())),GlobalMark()))); + h_ret.push_back(HeapElem(new MYTYPE(EdgeType::OrderedEdge( vfi.V1(),vfi.V()),GlobalMark()))); std::push_heap(h_ret.begin(),h_ret.end()); } } - if( !(vfi.F()->V2(vfi.I())->IsV()) && (vfi.F()->V2(vfi.I())->IsRW())) + if( !(vfi.V2()->IsV()) && (vfi.V2()->IsRW())) { - vfi.F()->V2(vfi.I())->SetV(); + vfi.V2()->SetV(); h_ret.push_back(HeapElem(new MYTYPE(EdgeType::OrderedEdge(vfi.F()->V(vfi.I()),vfi.F()->V2(vfi.I())),GlobalMark()))); std::push_heap(h_ret.begin(),h_ret.end()); //if(false){