CFx SDK Documentation 2024 SP0
|
#include <OdRandom.h>
Public Member Functions | |
OdRandom (OdRandomGen *newGenerator=NULL) | |
~OdRandom () | |
OdRandom (const OdRandom &iSrc) | |
void | operator= (const OdRandom &iSrc) |
OdRandomGen & | generator () |
const OdRandomGen & | generator () const |
OdUInt64 | genUInt64 (OdUInt64 low, OdUInt64 high) |
OdInt64 | genInt64 (OdInt64 low, OdInt64 high) |
OdUInt32 | genUInt (OdUInt32 low, OdUInt32 high) |
int | genInt (int low, int high) |
bool | genBool () |
double | genDouble () |
double | genDouble (double low, double high) |
template<class T , class A > | |
const T & | randomOf (const OdArray< T, A > &iArray) |
<group Other_Classes> Random number generator with support for uniform distributions.
A few important facts:
Sample usage: OdRandom rnd; for (int i = 0; i < 1000; i++) samples.push_back(rnd.genDouble(0, OdaPI));
Definition at line 65 of file OdRandom.h.
|
explicit |
OdRandom::~OdRandom | ( | ) |
OdRandom::OdRandom | ( | const OdRandom & | iSrc | ) |
bool OdRandom::genBool | ( | ) |
double OdRandom::genDouble | ( | ) |
double OdRandom::genDouble | ( | double | low, |
double | high | ||
) |
OdRandomGen & OdRandom::generator | ( | ) |
const OdRandomGen & OdRandom::generator | ( | ) | const |
int OdRandom::genInt | ( | int | low, |
int | high | ||
) |
|
inline |
Definition at line 90 of file OdRandom.h.