From c80fbfd59c41bbd69ba5b63881ede91d90391fd9 Mon Sep 17 00:00:00 2001 From: cignoni Date: Mon, 10 May 2004 13:43:00 +0000 Subject: [PATCH] Added use of VFIterator in VertexGeodesicFromBorder --- vcg/complex/trimesh/update/quality.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/vcg/complex/trimesh/update/quality.h b/vcg/complex/trimesh/update/quality.h index a9043521..28472015 100644 --- a/vcg/complex/trimesh/update/quality.h +++ b/vcg/complex/trimesh/update/quality.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.1 2004/03/31 14:59:14 cignoni +First working version! + Revision 1.2 2004/03/29 14:26:57 cignoni First working version! @@ -31,7 +34,7 @@ First working version! #ifndef __VCG_TRI_UPDATE_QUALITY #define __VCG_TRI_UPDATE_QUALITY - +#include namespace vcg { namespace tri { @@ -124,15 +127,15 @@ static void VertexGeodesicFromBorder(MeshType &m) // R1 } pv = heap.back().p; heap.pop_back(); - MeshType::vedgepos_type x; - for( x.f = pv->Fp(), x.z = pv->Zp(); x.f!=0; x.NextF() ) + + for(face::VFIterator vfi(pv) ; !vfi.End(); ++vfi ) { for(int k=0;k<2;++k) { VertexPointer pw; float d; - if(k==0) pw = x.f->V1(x.z); - else pw = x.f->V2(x.z); + if(k==0) pw = vfi.f->V1(vfi.z); + else pw = vfi.f->V2(vfi.z); d = Distance(pv->P(),pw->P()); if( pw->Q()==-1 || pw->Q() > pv->Q()+d + loc_eps) {