From 43e624c7fffff55c356d32025ee3d39b67b3adf7 Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Thu, 11 Mar 2021 19:42:30 +0100 Subject: [PATCH] using std::mt19937 --- vcg/complex/algorithms/point_sampling.h | 33 +++++++++++-------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/vcg/complex/algorithms/point_sampling.h b/vcg/complex/algorithms/point_sampling.h index 8e2418ed..702dbdef 100644 --- a/vcg/complex/algorithms/point_sampling.h +++ b/vcg/complex/algorithms/point_sampling.h @@ -35,6 +35,7 @@ sampling strategies (montecarlo, stratified etc). #ifndef __VCGLIB_POINT_SAMPLING #define __VCGLIB_POINT_SAMPLING +#include #include #include @@ -501,18 +502,6 @@ static unsigned int RandomInt(unsigned int i) return (SamplingRandomGenerator().generate(i)); } -class MarsenneTwisterURBG -{ -public: - typedef unsigned int result_type; - MarsenneTwisterURBG(result_type max) : _max(max) {} - result_type min() const {return 0;} - result_type max() const {return _max;} - result_type operator()() {return SamplingRandomGenerator().generate(_max);} -private: - result_type _max; -}; - // Returns a random number in the [0,1) real interval using the improved Marsenne-Twister method. static double RandomDouble01() { @@ -725,7 +714,9 @@ static void FillAndShuffleFacePointerVector(MeshType & m, std::vector &vertVec) { @@ -735,7 +726,9 @@ static void FillAndShuffleVertexPointerVector(MeshType & m, std::vector