class
Random
Generates pseudo random numbers using the Xorshift128 algorithm.
Suitable for high performance requirements.
Public
Constructors
Random
Initializes a new generator using the specified seed.
Methods
SetSeed
Changes the seed of the generator to the specified value.
Get
Returns a random value in range [0, std::numeric_limits <uint32 _t>::max()].
GetRange
Returns a random value in range [min, max].
GetUNorm
Returns a random value in range [0, 1].
GetSNorm
Returns a random value in range [-1, 1].
GetUnitVector
Returns a random unit vector in three dimensions.
GetUnitVector2D
Returns a random unit vector in two dimensions.
GetPointInSphere
Returns a random point inside a unit sphere.
GetPointInSphereShell
Returns a random point inside the specified range in a sphere shell of unit radius, with the specified thickness, in range [0, 1].
Thickness of 0 will generate points on the sphere surface, while thickness of 1 will generate points within the entire sphere volume. Intermediate values represent the shell, which is a volume between two concentric spheres.
GetPointInCircle
Returns a random point inside a unit circle.
GetPointInCircleShell
Returns a random point inside the specified range in a circle shell of unit radius, with the specified thickness, in range [0, 1].
Thickness of 0 will generate points on the circle edge, while thickness of 1 will generate points within the entire circle surface. Intermediate values represent the shell, which is the surface between two concentric circles.
GetPointInArc
Returns a random point on a unit arc with the specified length (angle).
Angle of 360 represents a circle.
GetPointInArcShell
Returns a random point inside the specified range in an arc shell of unit radius, with the specified length (angle) and thickness in range [0, 1].
Angle of 360 represents a circle shell. Thickness of 0 will generate points on the arc edge, while thickness of 1 will generate points on the entire arc 'slice'. Intermediate vlaues represent the shell, which is the surface between two concentric circles.
GetBarycentric
Returns a random set of Barycentric coordinates that may be used for generating random points on a triangle.