_noise.hpp
Go to the documentation of this file.
1 
29 #pragma once
30 
31 namespace glm{
32 namespace detail
33 {
34  template <typename T>
36  {
37  return x - floor(x * static_cast<T>(1.0) / static_cast<T>(289.0)) * static_cast<T>(289.0);
38  }
39 
40  template <typename T>
42  {
43  return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
44  }
45 
46  template <typename T, precision P>
48  {
49  return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
50  }
51 
52  template <typename T, precision P>
54  {
55  return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
56  }
57 
58  template <typename T, precision P>
60  {
61  return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
62  }
63 /*
64  template <typename T, precision P, template<typename> class vecType>
65  GLM_FUNC_QUALIFIER vecType<T, P> permute(vecType<T, P> const & x)
66  {
67  return mod289(((x * T(34)) + T(1)) * x);
68  }
69 */
70  template <typename T>
72  {
73  return T(1.79284291400159) - T(0.85373472095314) * r;
74  }
75 
76  template <typename T, precision P>
78  {
79  return T(1.79284291400159) - T(0.85373472095314) * r;
80  }
81 
82  template <typename T, precision P>
84  {
85  return T(1.79284291400159) - T(0.85373472095314) * r;
86  }
87 
88  template <typename T, precision P>
90  {
91  return T(1.79284291400159) - T(0.85373472095314) * r;
92  }
93 /*
94  template <typename T, precision P, template<typename> class vecType>
95  GLM_FUNC_QUALIFIER vecType<T, P> taylorInvSqrt(vecType<T, P> const & r)
96  {
97  return T(1.79284291400159) - T(0.85373472095314) * r;
98  }
99 */
100 
101  template <typename T, precision P>
103  {
104  return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
105  }
106 
107  template <typename T, precision P>
109  {
110  return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
111  }
112 
113  template <typename T, precision P>
115  {
116  return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
117  }
118 /*
119  template <typename T, precision P, template <typename> class vecType>
120  GLM_FUNC_QUALIFIER vecType<T, P> fade(vecType<T, P> const & t)
121  {
122  return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
123  }
124 */
125 }//namespace detail
126 }//namespace glm
127 
T
GLM_FUNC_QUALIFIER T permute(T const &x)
Definition: _noise.hpp:41
GLM_FUNC_DECL genType floor(genType const &x)
GLM_FUNC_QUALIFIER detail::tvec2< T, P > fade(detail::tvec2< T, P > const &t)
Definition: _noise.hpp:102
GLM_FUNC_QUALIFIER T taylorInvSqrt(T const &r)
Definition: _noise.hpp:71
GLM_FUNC_QUALIFIER T mod289(T const &x)
Definition: _noise.hpp:35
#define GLM_FUNC_QUALIFIER
Definition: setup.hpp:729


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:37:27