From fcda357077bd9cde83ea77d22f5081eb8bc94a7f Mon Sep 17 00:00:00 2001 From: Nico Pietroni nicopietroni Date: Wed, 14 Oct 2009 15:34:17 +0000 Subject: [PATCH] changed VF topology in ExecuteFlip function --- .../filter_isoparametrization/param_flip.h | 33 +++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/src/meshlabplugins/filter_isoparametrization/param_flip.h b/src/meshlabplugins/filter_isoparametrization/param_flip.h index 93a50ba74..e60457a36 100644 --- a/src/meshlabplugins/filter_isoparametrization/param_flip.h +++ b/src/meshlabplugins/filter_isoparametrization/param_flip.h @@ -20,14 +20,13 @@ class ParamEdgeFlip : public vcg::tri::PlanarEdgeFlip_pos.F(), this->_pos.E())) return false; - ///ScalarType diff=EdgeDiff(); - /*return true;*/ - return (this->_priority>0); + + return (this->_priority>0); } inline ParamEdgeFlip() {} @@ -35,7 +34,7 @@ class ParamEdgeFlip : public vcg::tri::PlanarEdgeFlippos type */ - inline ParamEdgeFlip(const typename Super::PosType pos, int mark) + inline ParamEdgeFlip(const typename Super::PosType pos, int mark) { this->_pos = pos; this->_localMark = mark; @@ -72,9 +71,31 @@ class ParamEdgeFlip : public vcg::tri::PlanarEdgeFlip(father,bary,v->T().U(),v->T().V()); } + + ///update VF topology + FaceType *f1=f.FFp(edge); + FaceType *f0=&f; + vcg::face::VFDetach(*f1,0); + vcg::face::VFDetach(*f1,1); + vcg::face::VFDetach(*f1,2); + vcg::face::VFDetach(*f0,0); + vcg::face::VFDetach(*f0,1); + vcg::face::VFDetach(*f0,2); ///then do the effective flip + vcg::face::FlipEdge(f,edge); + + + vcg::face::VFAppend(f1,0); + vcg::face::VFAppend(f1,1); + vcg::face::VFAppend(f1,2); + vcg::face::VFAppend(f0,0); + vcg::face::VFAppend(f0,1); + vcg::face::VFAppend(f0,2); + ///edh updating topology + + ///set son->father new link for (unsigned int i=0;i_priority=EdgeDiff(); + this->_priority=EdgeDiff(); return this->_priority; }