diff --git a/vcg/complex/algorithms/point_sampling.h b/vcg/complex/algorithms/point_sampling.h index 0afbb3ba..1d61bbfd 100644 --- a/vcg/complex/algorithms/point_sampling.h +++ b/vcg/complex/algorithms/point_sampling.h @@ -494,6 +494,18 @@ static math::MarsenneTwisterRNG &SamplingRandomGenerator() return rnd; } +class MarsenneTwisterURBG +{ +public: + MarsenneTwisterURBG(unsigned int max) : _max(max) {} + typedef unsigned int result_type; + unsigned int min() const {return 0;} + unsigned int max() const {return _max;} + unsigned int operator()() {return RandomInt(_max);} +private: + unsigned int _max; +}; + // Returns an integer random number in the [0,i-1] interval using the improve Marsenne-Twister method. // this functor is needed for passing it to the std functions. static unsigned int RandomInt(unsigned int i) @@ -712,8 +724,8 @@ static void FillAndShuffleFacePointerVector(MeshType & m, std::vector &vertVec) { @@ -722,8 +734,8 @@ static void FillAndShuffleVertexPointerVector(MeshType & m, std::vector