34 m_generator.seed(static_cast<unsigned int>(std::time(0)));
51 std::uniform_real_distribution<Real> MinusPlusOneFloatDistrib(-1.0
f, 1.0
f);
54 std::uniform_real_distribution<Real> ZeroOneFloatDistrib(0.0, 1.0);
simple Vec2 encapsulates a 3 float object like glsl Vec2 but not maths use the Vec2 class for maths a...
Vec4 & normalize() noexcept
Normalize the vector using .
simple class to hold colour information and set the basic opengl colour state. also has overloaded me...
simple Vector class for OpenGL graphics, contains overloaded operators for most math functions...
constexpr auto RandomFloat
void setSeed()
set the seed using std::time(NULL)
Vec4 getRandomVec4()
get a random vector with componets ranged from +/- 1
Vec2 getRandomNormalizedVec2()
get a random vector with componets ranged from +/- 1 and Normalized
Colour getRandomColour()
return a random colour with rgb components clamped between 0-1
Colour getRandomColourAndAlpha()
return a random colour with rgba components clamped between 0-1
simple Vec3 encapsulates a 3 float object like glsl vec3 but not maths use the Vec3 class for maths a...
implementation files for RibExport class
Real randomPositiveNumber(Real _mult=1)
a replacement for the old ReandomPosNum this is basically a convinience function
PRECISION Real
create a variable called Real which is the main data type we use (GLfloat for most cases) ...
Vec4 getRandomNormalizedVec4()
get a random vector with componets ranged from +/- 1 and Normalized
Vec3 getRandomPoint(Real _xRange=1.0, Real _yRange=1.0, Real _zRange=1.0)
get a random point in 3D space defaults to +/- 1 else user defined range
void normalize() noexcept
Normalize the vector using .
constexpr auto RandomPositiveFloat
std::unordered_map< std::string, std::uniform_real_distribution< Real > > m_floatGenerators
our map to hold the generator data basically we are going to hold a name / function pair...
Real getFloatFromGeneratorName(const std::string &_name)
gets a pre-generated Real value for a genetator
std::mt19937 m_generator
the generator for rng class where all funcs and distribs are added. all we need to do is replace this...
Real randomNumber(Real _mult=1)
a replacement for the old RandomNumber func this is basically a convinience function ...
Vec2 getRandomVec2()
get a random vector with componets ranged from +/- 1
an encapsulation of the std::random classes
Random()
ctor hidden in protected as we are a singleton class
Vec3 getRandomVec3()
get a random vector with componets ranged from +/- 1
void normalize() noexcept
Normalize the vector using .
GLsizei const GLchar *const * string
Vec3 getRandomNormalizedVec3()
get a random vector with componets ranged from +/- 1 and Normalized