0.9.9 API documenation: random.hpp Source File

| 0.9.9 API documenation

- Main Page
- Modules
- Files

- File List

random.hpp
Go to the documentation of this file.
1
14 #pragma once
15
16 // Dependency:
17 #include "../vec2.hpp"
18 #include "../vec3.hpp"
19
20 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
21 # pragma message("GLM: GLM_GTC_random extension included")
22 #endif
23
24 namespace glm
25 {
28
35 template <typename genTYpe>
36 GLM_FUNC_DECL genTYpe linearRand(
37 genTYpe Min,
38 genTYpe Max);
39
47 template <typename T, precision P, template <typename, precision> class vecType>
48 GLM_FUNC_DECL vecType<T, P> linearRand(
49 vecType<T, P> const & Min,
50 vecType<T, P> const & Max);
51
57 template <typename genType>
58 GLM_FUNC_DECL genType gaussRand(
59 genType Mean,
60 genType Deviation);
61
66 template <typename T>
67 GLM_FUNC_DECL tvec2<T, defaultp> circularRand(
68 T Radius);
69
74 template <typename T>
75 GLM_FUNC_DECL tvec3<T, defaultp> sphericalRand(
76 T Radius);
77
82 template <typename T>
83 GLM_FUNC_DECL tvec2<T, defaultp> diskRand(
84 T Radius);
85
90 template <typename T>
91 GLM_FUNC_DECL tvec3<T, defaultp> ballRand(
92 T Radius);
93
95 }//namespace glm
96
97 #include "random.inl"
glm::sphericalRand
GLM_FUNC_DECL tvec3< T, defaultp > sphericalRand(T Radius)
Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius...
glm::diskRand
GLM_FUNC_DECL tvec2< T, defaultp > diskRand(T Radius)
Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a...
glm::linearRand
GLM_FUNC_DECL vecType< T, P > linearRand(vecType< T, P > const &Min, vecType< T, P > const &Max)
Generate random numbers in the interval [Min, Max], according a linear distribution.
glm
Definition: _noise.hpp:11
glm::ballRand
GLM_FUNC_DECL tvec3< T, defaultp > ballRand(T Radius)
Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of...
glm::circularRand
GLM_FUNC_DECL tvec2< T, defaultp > circularRand(T Radius)
Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius...
glm::gaussRand
GLM_FUNC_DECL genType gaussRand(genType Mean, genType Deviation)
Generate random numbers in the interval [Min, Max], according a gaussian distribution.