diff --git a/vcg/complex/algorithms/point_sampling.h b/vcg/complex/algorithms/point_sampling.h index 385e525d..6903e24a 100644 --- a/vcg/complex/algorithms/point_sampling.h +++ b/vcg/complex/algorithms/point_sampling.h @@ -1896,7 +1896,8 @@ void PoissonSampling(MeshType &m, // the mesh that has to be sampled std::vector &poissonSamples, // the vector that will contain the set of points int sampleNum, // the desired number sample, if zero you must set the radius to the wanted value typename MeshType::ScalarType &radius, // the Poisson Disk Radius (used if sampleNum==0, setted if sampleNum!=0) - typename MeshType::ScalarType radiusVariance=1) + typename MeshType::ScalarType radiusVariance=1, + typename MeshType::ScalarType PruningByNumberTolerance=0.04f) { typedef tri::TrivialSampler BaseSampler; @@ -1929,7 +1930,7 @@ void PoissonSampling(MeshType &m, // the mesh that has to be sampled pp.radiusVariance=radiusVariance; } if(sampleNum==0) tri::SurfaceSampling::PoissonDiskPruning(pdSampler, MontecarloMesh, radius,pp); - else tri::SurfaceSampling::PoissonDiskPruningByNumber(pdSampler, MontecarloMesh, sampleNum, radius,pp); + else tri::SurfaceSampling::PoissonDiskPruningByNumber(pdSampler, MontecarloMesh, sampleNum, radius,pp,PruningByNumberTolerance); int t2=clock(); pp.pds.totalTime = t2-t0; }