From 19296e27b98714e9595e28e204b620335c6b9c5b Mon Sep 17 00:00:00 2001 From: Paolo Cignoni Date: Tue, 20 Feb 2018 16:37:39 +0100 Subject: [PATCH] added return value to the WedgeTexMergeClose to comply the style... --- vcg/complex/algorithms/update/texture.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vcg/complex/algorithms/update/texture.h b/vcg/complex/algorithms/update/texture.h index 876d2875..eea8b61c 100644 --- a/vcg/complex/algorithms/update/texture.h +++ b/vcg/complex/algorithms/update/texture.h @@ -145,10 +145,10 @@ static void WedgeTexRemoveNull(ComputeMeshType &m, const std::string &texturenam * the default for merging is if two textures dist less than one 16th of texel on a 4k texture... */ -static void WedgeTexMergeClose(ComputeMeshType &m, ScalarType mergeThr = ScalarType(1.0/65536.0) ) +static int WedgeTexMergeClose(ComputeMeshType &m, ScalarType mergeThr = ScalarType(1.0/65536.0) ) { tri::RequireVFAdjacency(m); - + int mergedCnt=0; ForEachVertex(m, [&](VertexType &v){ face::VFIterator vfi(&v); std::vector clusterVec; @@ -161,6 +161,7 @@ static void WedgeTexMergeClose(ComputeMeshType &m, ScalarType mergeThr = ScalarT for(auto p:clusterVec) { if(Distance(p,cur) < mergeThr){ vfi.F()->WT(vfi.I()).P()=p; + ++mergedCnt; merged=true; } } @@ -169,7 +170,8 @@ static void WedgeTexMergeClose(ComputeMeshType &m, ScalarType mergeThr = ScalarT ++vfi; } - }); + }); + return mergedCnt; } }; // end class