template<class T_> struct osgParticle::range

A simple struct template useful to store ranges of values as min/max pairs.

[more]T_ minimum
Lower bound
[more]T_ maximum
Higher bound
[more] range()
Construct the object by calling default constructors for min and max
[more] range(const T_ &mn, const T_ &mx)
Construct and initialize min and max directly
[more]void set(const T_ &mn, const T_ &mx)
Set min and max
[more]T_ get_random() const
Get a random value between min and max
[more]T_ get_random_sqrtf() const
Get a random square root value between min and max


Documentation

A simple struct template useful to store ranges of values as min/max pairs. This struct template helps storing min/max ranges for values of any kind; class T_ is the type of values to be stored, and it must support operations T_ + T_, T_ - T_, and T_ * float, otherwise the get_random() method will not compile. This struct could be extended to customize the random number generator (now it uses only std::rand()).
oT_ minimum
Lower bound

oT_ maximum
Higher bound

o range()
Construct the object by calling default constructors for min and max

o range(const T_ &mn, const T_ &mx)
Construct and initialize min and max directly

ovoid set(const T_ &mn, const T_ &mx)
Set min and max

oT_ get_random() const
Get a random value between min and max

oT_ get_random_sqrtf() const
Get a random square root value between min and max

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.