From 0337582896db7f1c66c679e77c6939cf8345d720 Mon Sep 17 00:00:00 2001 From: cignoni Date: Thu, 28 Aug 2014 09:28:39 +0000 Subject: [PATCH] Added managment of fixed vertices in the restricted voronoi relaxing --- vcg/complex/algorithms/voronoi_processing.h | 26 +++++++++++++++------ 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/vcg/complex/algorithms/voronoi_processing.h b/vcg/complex/algorithms/voronoi_processing.h index 3ca9e8a8..03a2018a 100644 --- a/vcg/complex/algorithms/voronoi_processing.h +++ b/vcg/complex/algorithms/voronoi_processing.h @@ -1186,12 +1186,13 @@ static int RestrictedVoronoiRelaxing(MeshType &m, std::vector &see { PerVertexPointerHandle sources = tri::Allocator:: template GetPerVertexAttribute (m,"sources"); PerVertexBoolHandle fixed = tri::Allocator:: template GetPerVertexAttribute (m,"fixed"); - + std::vector fixedVec; std::vector seedPosVec; - for(size_t i=0;iP()); + fixedVec.push_back(fixed[seedVec[i]]); + } - bool changed=false; assert(m.vn > seedPosVec.size()*20); int i; @@ -1214,16 +1215,27 @@ static int RestrictedVoronoiRelaxing(MeshType &m, std::vector &see } vector newseedVec; + vector newfixedVec; for(int i=0;i::PerVertexQualityRamp(m); - - qDebug("performed %i relax step on %i",i,relaxStep); } SeedToVertexConversion(m,seedPosVec,seedVec);