- Main Page
- Related Pages
- Modules
- Files

- File List

gtx/quaternion.hpp
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 valType const & exponent);
99
103 template <typename valType>
104 detail::tquat<valType> log(
105 detail::tquat<valType> const & q);
106
110 template <typename valType>
111 detail::tquat<valType> pow(
112 detail::tquat<valType> const & x,
113 valType const & y);
114
118 //template <typename valType>
119 //detail::tquat<valType> sqrt(
120 // detail::tquat<valType> const & q);
121
125 template <typename valType>
126 detail::tvec3<valType> rotate(
127 detail::tquat<valType> const & q,
128 detail::tvec3<valType> const & v);
129
133 template <typename valType>
134 detail::tvec4<valType> rotate(
135 detail::tquat<valType> const & q,
136 detail::tvec4<valType> const & v);
137
141 template <typename valType>
142 valType extractRealComponent(
143 detail::tquat<valType> const & q);
144
148 template <typename valType>
149 detail::tmat3x3<valType> toMat3(
150 detail::tquat<valType> const & x){return mat3_cast(x);}
151
155 template <typename valType>
156 detail::tmat4x4<valType> toMat4(
157 detail::tquat<valType> const & x){return mat4_cast(x);}
158
162 template <typename valType>
163 detail::tquat<valType> toQuat(
164 detail::tmat3x3<valType> const & x){return quat_cast(x);}
165
169 template <typename valType>
170 detail::tquat<valType> toQuat(
171 detail::tmat4x4<valType> const & x){return quat_cast(x);}
172
176 template <typename T>
177 detail::tquat<T> shortMix(
178 detail::tquat<T> const & x,
179 detail::tquat<T> const & y,
180 T const & a);
181
185 template <typename T>
186 detail::tquat<T> fastMix(
187 detail::tquat<T> const & x,
188 detail::tquat<T> const & y,
189 T const & a);
190
192 }//namespace glm
193
194 #include "quaternion.inl"
195
196 #endif//GLM_GTX_quaternion