Flow Visualisation
quaternion.hpp
Go to the documentation of this file.
1 
39 #ifndef GLM_GTX_quaternion
40 #define GLM_GTX_quaternion GLM_VERSION
41 
42 // Dependency:
43 #include "../glm.hpp"
44 #include "../gtc/quaternion.hpp"
45 
46 #if(defined(GLM_MESSAGES) && !defined(glm_ext))
47 # pragma message("GLM: GLM_GTX_quaternion extension included")
48 #endif
49 
50 namespace glm
51 {
54 
58  template <typename valType>
59  detail::tvec3<valType> cross(
60  detail::tquat<valType> const & q,
61  detail::tvec3<valType> const & v);
62 
66  template <typename valType>
67  detail::tvec3<valType> cross(
68  detail::tvec3<valType> const & v,
69  detail::tquat<valType> const & q);
70 
75  template <typename valType>
76  detail::tquat<valType> squad(
77  detail::tquat<valType> const & q1,
78  detail::tquat<valType> const & q2,
79  detail::tquat<valType> const & s1,
80  detail::tquat<valType> const & s2,
81  valType const & h);
82 
86  template <typename valType>
87  detail::tquat<valType> intermediate(
88  detail::tquat<valType> const & prev,
89  detail::tquat<valType> const & curr,
90  detail::tquat<valType> const & next);
91 
95  template <typename valType>
96  detail::tquat<valType> exp(
97  detail::tquat<valType> const & q);
98 
102  template <typename valType>
103  detail::tquat<valType> log(
104  detail::tquat<valType> const & q);
105 
109  template <typename valType>
110  detail::tquat<valType> pow(
111  detail::tquat<valType> const & x,
112  valType const & y);
113 
117  //template <typename valType>
118  //detail::tquat<valType> sqrt(
119  // detail::tquat<valType> const & q);
120 
124  template <typename valType>
125  detail::tvec3<valType> rotate(
126  detail::tquat<valType> const & q,
127  detail::tvec3<valType> const & v);
128 
132  template <typename valType>
133  detail::tvec4<valType> rotate(
134  detail::tquat<valType> const & q,
135  detail::tvec4<valType> const & v);
136 
140  template <typename valType>
141  valType extractRealComponent(
142  detail::tquat<valType> const & q);
143 
147  template <typename valType>
149  detail::tquat<valType> const & x){return mat3_cast(x);}
150 
154  template <typename valType>
156  detail::tquat<valType> const & x){return mat4_cast(x);}
157 
161  template <typename valType>
163  detail::tmat3x3<valType> const & x){return quat_cast(x);}
164 
168  template <typename valType>
170  detail::tmat4x4<valType> const & x){return quat_cast(x);}
171 
175  template <typename T>
176  detail::tquat<T> shortMix(
177  detail::tquat<T> const & x,
178  detail::tquat<T> const & y,
179  T const & a);
180 
184  template <typename T>
185  detail::tquat<T> fastMix(
186  detail::tquat<T> const & x,
187  detail::tquat<T> const & y,
188  T const & a);
189 
191 }//namespace glm
192 
193 #include "quaternion.inl"
194 
195 #endif//GLM_GTX_quaternion
GLM_FUNC_DECL genType log(genType const &x)
Definition: func_exponential.inl:63
detail::tquat< valType > intermediate(detail::tquat< valType > const &prev, detail::tquat< valType > const &curr, detail::tquat< valType > const &next)
detail::tmat4x4< valType > toMat4(detail::tquat< valType > const &x)
Definition: quaternion.hpp:155
detail::tmat4x4< T > mat4_cast(detail::tquat< T > const &x)
Definition: quaternion.inl:648
detail::tquat< valType > toQuat(detail::tmat3x3< valType > const &x)
Definition: quaternion.hpp:162
detail::tmat4x4< T > rotate(detail::tmat4x4< T > const &m, T const &angle, detail::tvec3< T > const &axis)
Definition: matrix_transform.inl:45
Definition: type_mat2x2.hpp:45
Definition: _detail.hpp:38
detail::tquat< T > fastMix(detail::tquat< T > const &x, detail::tquat< T > const &y, T const &a)
Definition: quaternion.inl:200
Definition: _swizzle.hpp:43
detail::tquat< valType > squad(detail::tquat< valType > const &q1, detail::tquat< valType > const &q2, detail::tquat< valType > const &s1, detail::tquat< valType > const &s2, valType const &h)
valType extractRealComponent(detail::tquat< valType > const &q)
Definition: quaternion.hpp:56
detail::tquat< T > shortMix(detail::tquat< T > const &x, detail::tquat< T > const &y, T const &a)
Definition: quaternion.inl:158
detail::tmat3x3< valType > toMat3(detail::tquat< valType > const &x)
Definition: quaternion.hpp:148
GLM_FUNC_DECL genType exp(genType const &x)
Definition: func_exponential.inl:49
GLM_FUNC_DECL genType pow(genType const &base, genType const &exponent)
Definition: func_exponential.inl:34
detail::tquat< T > quat_cast(detail::tmat3x3< T > const &x)
Definition: quaternion.inl:657
Definition: type_mat2x2.hpp:49
GLM_FUNC_DECL detail::tvec3< valType > cross(detail::tvec3< valType > const &x, detail::tvec3< valType > const &y)
detail::tmat3x3< T > mat3_cast(detail::tquat< T > const &x)
Definition: quaternion.inl:627