added return value to the WedgeTexMergeClose

to comply the style...
This commit is contained in:
Paolo Cignoni 2018-02-20 16:37:39 +01:00
parent bbed4de2f6
commit 19296e27b9
1 changed files with 5 additions and 3 deletions

View File

@ -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<FaceType> vfi(&v);
std::vector<UVCoordType> 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