| 0.9.8

- Main Page
- Modules
- Files

- File List

random.hpp
Go to the documentation of this file.
1
15 #pragma once
16
17 // Dependency:
18 #include "../vec2.hpp"
19 #include "../vec3.hpp"
20
21 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
22 # pragma message("GLM: GLM_GTC_random extension included")
23 #endif
24
25 namespace glm
26 {
29
36 template <typename genTYpe>
37 GLM_FUNC_DECL genTYpe linearRand(
38 genTYpe Min,
39 genTYpe Max);
40
48 template <typename T, precision P, template <typename, precision> class vecType>
49 GLM_FUNC_DECL vecType<T, P> linearRand(
50 vecType<T, P> const & Min,
51 vecType<T, P> const & Max);
52
58 template <typename genType>
59 GLM_FUNC_DECL genType gaussRand(
60 genType Mean,
61 genType Deviation);
62
67 template <typename T>
68 GLM_FUNC_DECL tvec2<T, defaultp> circularRand(
69 T Radius);
70
75 template <typename T>
76 GLM_FUNC_DECL tvec3<T, defaultp> sphericalRand(
77 T Radius);
78
83 template <typename T>
84 GLM_FUNC_DECL tvec2<T, defaultp> diskRand(
85 T Radius);
86
91 template <typename T>
92 GLM_FUNC_DECL tvec3<T, defaultp> ballRand(
93 T Radius);
94
96 }//namespace glm
97
98 #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.