From 33675854652a298874d372f742d35083dd359651 Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Thu, 2 Sep 2004 10:06:18 +0000 Subject: [PATCH] defined mytype and used on updateheap and init functions to extend tri_edge_collapse --- vcg/complex/local_optimization/tri_edge_collapse.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vcg/complex/local_optimization/tri_edge_collapse.h b/vcg/complex/local_optimization/tri_edge_collapse.h index c8f9a8dc..2fdecf09 100644 --- a/vcg/complex/local_optimization/tri_edge_collapse.h +++ b/vcg/complex/local_optimization/tri_edge_collapse.h @@ -66,11 +66,12 @@ public: }; typedef typename TriMeshType::FaceType FaceType; - typedef typename FaceType::VertexType VertexType; + 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 TriEdgeCollapse MyType; protected: @@ -136,7 +137,7 @@ public: { PosType p; p.Set(VFi.F(),VFi.I(),VFi.f->V(VFi.z)); - h_ret.push_back(HeapElem(new TriEdgeCollapse(p,_Imark()))); + 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(); @@ -188,7 +189,7 @@ public: for (int j=0;j<3;j++) { PosType p=PosType(&*fi,j,(*fi).V(j)); - h_ret.push_back(HeapElem(new TriEdgeCollapse(p,m.IMark()))); + h_ret.push_back(HeapElem(new MyType(p,m.IMark()))); //printf("Inserting in heap coll %3i ->%3i %f\n",p.V()-&m.vert[0],p.VFlip()-&m.vert[0],h_ret.back().locModPtr->Priority()); } }