Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
OpenMesh::RandomNumberGenerator Class Reference

#include <libs_required/OpenMesh/src/OpenMesh/Core/Utils/RandomNumberGenerator.hh>

Public Member Functions

 RandomNumberGenerator (const size_t _resolution)
 Constructor. More...
double getRand () const
 returns a random double between 0.0 and 1.0 with a guaranteed resolution
double resolution () const

Private Attributes

const size_t resolution_
 desired resolution
size_t iterations_
 number of "blocks" of RAND_MAX that make up the desired _resolution
double maxNum_
 maximum random number generated, which is used for normalization

Detailed Description

Generate a random number between 0.0 and 1.0 with a guaranteed resolution ( Number of possible values )

Especially useful on windows, as there MAX_RAND is often only 32k which is not enough resolution for a lot of applications

Definition at line 78 of file RandomNumberGenerator.hh.

Constructor & Destructor Documentation

OpenMesh::RandomNumberGenerator::RandomNumberGenerator ( const size_t  _resolution)


_resolutionspecifies the desired resolution for the random number generated

Definition at line 66 of file

The documentation for this class was generated from the following files: