From de4b5c1d4390c13a1a1f759f2801f6a4b9db2f25 Mon Sep 17 00:00:00 2001 From: ganovelli Date: Wed, 15 Sep 2004 11:20:15 +0000 Subject: [PATCH] changed P() to cP() --- .../local_optimization/tri_edge_collapse.h | 28 +++++++++++-------- vcg/complex/trimesh/update/bounding.h | 5 +++- vcg/simplex/face/base.h | 5 +++- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/vcg/complex/local_optimization/tri_edge_collapse.h b/vcg/complex/local_optimization/tri_edge_collapse.h index fa2f147b..785b3a8f 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.11 2004/09/09 13:23:01 ponchio + Header guards typo + Revision 1.10 2004/09/09 13:01:12 ponchio Linux compatible path in #include @@ -74,16 +77,16 @@ public: Border() =0; } }; - +protected: typedef typename TriMeshType::FaceType FaceType; typedef typename FaceType::VertexType VertexType; typedef typename FaceType::VertexType::CoordType CoordType; typedef typename TriMeshType::VertexType::ScalarType ScalarType; typedef vcg::face::Pos PosType; typedef typename LocalOptimization::HeapElem HeapElem; - + typedef typename LocalOptimization::HeapType HeapType; + -protected: ///the pos of collapse PosType pos; @@ -116,7 +119,7 @@ public: ScalarType ComputePriority() { - _priority = Distance(pos.V()->P(),pos.VFlip()->P()); + _priority = Distance(pos.V()->cP(),pos.VFlip()->cP()); return _priority; } @@ -135,23 +138,24 @@ public: } - void UpdateHeap(typename LocalOptimization::HeapType & h_ret) + void UpdateHeap(HeapType & h_ret) { _Imark()++; - vcg::face::VFIterator VFi(pos.V(1)->VFp(),pos.V(1)->VFi()); - while (!VFi.End()) + vcg::face::VFIterator vfi(pos.V(1)->VFp(),pos.V(1)->VFi()); + while (!vfi.End()) { for (int j=0;j<3;j++) + if( (vfi.F()->V(vfi.I())->IsRW()) && (vfi.F()->V1(vfi.I())->IsRW())) { PosType p; - p.Set(VFi.F(),VFi.I(),VFi.f->V(VFi.z)); + p.Set(vfi.F(),vfi.I(),vfi.f->V(vfi.z)); h_ret.push_back(HeapElem(new MYTYPE(p,_Imark()))); std::push_heap(h_ret.begin(),h_ret.end()); //// update the mark of the vertices - VFi.f->V(VFi.z)->IMark() = _Imark(); - VFi.f->V( (VFi.z+1) % 3 )->IMark() = _Imark(); + vfi.f->V(vfi.z)->IMark() = _Imark(); + vfi.f->V( (vfi.z+1) % 3 )->IMark() = _Imark(); } - ++VFi; + ++vfi; } } @@ -189,7 +193,7 @@ public: return _priority; } - static void Init(TriMeshType&m,typename LocalOptimization::HeapType&h_ret){ + static void Init(TriMeshType&m,HeapType&h_ret){ h_ret.clear(); typename TriMeshType::FaceIterator fi; for(fi = m.face.begin(); fi != m.face.end();++fi) diff --git a/vcg/complex/trimesh/update/bounding.h b/vcg/complex/trimesh/update/bounding.h index 28d27a49..2d7e0910 100644 --- a/vcg/complex/trimesh/update/bounding.h +++ b/vcg/complex/trimesh/update/bounding.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.1 2004/04/05 11:56:13 cignoni +First working version! + Revision 1.2 2004/03/12 15:22:19 cignoni Written some documentation and added to the trimes doxygen module @@ -68,7 +71,7 @@ static void Box(ComputeMeshType &m) m.bbox.SetNull(); VertexIterator vi; for(vi=m.vert.begin();vi!=m.vert.end();++vi) - if( !(*vi).IsD() ) m.bbox.Add((*vi).P()); + if( !(*vi).IsD() ) m.bbox.Add((*vi).cP()); } diff --git a/vcg/simplex/face/base.h b/vcg/simplex/face/base.h index 1716e420..bd820310 100644 --- a/vcg/simplex/face/base.h +++ b/vcg/simplex/face/base.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.19 2004/09/14 19:47:02 ganovelli +removed "&" in FFp + Revision 1.18 2004/08/25 15:15:27 ganovelli minor changes to comply gcc compiler (typename's and stuff) @@ -1117,7 +1120,7 @@ ScalarType Perimeter() const ScalarType QualityFace( ) const { - return Quality(V(0)->P(), V(1)->P(), V(2)->P()); + return Quality(V(0)->cP(), V(1)->cP(), V(2)->cP()); /* CoordType d10 = V(1)->P() - V(0)->P(); CoordType d20 = V(2)->P() - V(0)->P();