GLM 0.9.5

- Main Page
- Related Pages
- Modules
- Namespaces
- Files

- File List

gtc/random.hpp
Go to the documentation of this file.
1
40 #ifndef GLM_GTC_random
41 #define GLM_GTC_random
42
43 // Dependency:
44 #include "../vec2.hpp"
45 #include "../vec3.hpp"
46
47 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
48 # pragma message("GLM: GLM_GTC_random extension included")
49 #endif
50
51 namespace glm
52 {
55
62 template <typename genType>
63 GLM_FUNC_DECL genType linearRand(
64 genType const & Min,
65 genType const & Max);
66
72 template <typename genType>
73 GLM_FUNC_DECL genType gaussRand(
74 genType const & Mean,
75 genType const & Deviation);
76
81 template <typename T>
82 GLM_FUNC_DECL detail::tvec2<T, defaultp> circularRand(
83 T const & Radius);
84
89 template <typename T>
90 GLM_FUNC_DECL detail::tvec3<T, defaultp> sphericalRand(
91 T const & Radius);
92
97 template <typename T>
98 GLM_FUNC_DECL detail::tvec2<T, defaultp> diskRand(
99 T const & Radius);
100
105 template <typename T>
106 GLM_FUNC_DECL detail::tvec3<T, defaultp> ballRand(
107 T const & Radius);
108
110 }//namespace glm
111
112 #include "random.inl"
113
114 #endif//GLM_GTC_random
glm::circularRand
GLM_FUNC_DECL detail::tvec2< T, defaultp > circularRand(T const &Radius)
Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius...
glm::sphericalRand
GLM_FUNC_DECL detail::tvec3< T, defaultp > sphericalRand(T const &Radius)
Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius...
glm::gaussRand
GLM_FUNC_DECL genType gaussRand(genType const &Mean, genType const &Deviation)
Generate random numbers in the interval [Min, Max], according a gaussian distribution.
glm::ballRand
GLM_FUNC_DECL detail::tvec3< T, defaultp > ballRand(T const &Radius)
Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of...
glm::linearRand
GLM_FUNC_DECL genType linearRand(genType const &Min, genType const &Max)
Generate random numbers in the interval [Min, Max], according a linear distribution.
glm::diskRand
GLM_FUNC_DECL detail::tvec2< T, defaultp > diskRand(T const &Radius)
Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a...