| 1.0.0 API documentation

euler_angles.hpp
Go to the documentation of this file.
1
16 #pragma once
17
18 // Dependency:
19 #include "../glm.hpp"
20
21 #ifndef GLM_ENABLE_EXPERIMENTAL
22 # error "GLM: GLM_GTX_euler_angles is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
23 #elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_euler_angles extension included")
25 #endif
26
27 namespace glm
28 {
31
34 template<typename T>
35 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleX(
36 T const& angleX);
37
40 template<typename T>
41 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleY(
42 T const& angleY);
43
46 template<typename T>
47 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZ(
48 T const& angleZ);
49
52 template <typename T>
53 GLM_FUNC_DECL mat<4, 4, T, defaultp> derivedEulerAngleX(
54 T const & angleX, T const & angularVelocityX);
55
58 template <typename T>
59 GLM_FUNC_DECL mat<4, 4, T, defaultp> derivedEulerAngleY(
60 T const & angleY, T const & angularVelocityY);
61
64 template <typename T>
65 GLM_FUNC_DECL mat<4, 4, T, defaultp> derivedEulerAngleZ(
66 T const & angleZ, T const & angularVelocityZ);
67
70 template<typename T>
71 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXY(
72 T const& angleX,
73 T const& angleY);
74
77 template<typename T>
78 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYX(
79 T const& angleY,
80 T const& angleX);
81
84 template<typename T>
85 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXZ(
86 T const& angleX,
87 T const& angleZ);
88
91 template<typename T>
92 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZX(
93 T const& angle,
94 T const& angleX);
95
98 template<typename T>
99 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYZ(
100 T const& angleY,
101 T const& angleZ);
102
105 template<typename T>
106 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZY(
107 T const& angleZ,
108 T const& angleY);
109
112 template<typename T>
113 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXYZ(
114 T const& t1,
115 T const& t2,
116 T const& t3);
117
120 template<typename T>
121 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYXZ(
122 T const& yaw,
123 T const& pitch,
124 T const& roll);
125
128 template <typename T>
129 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXZX(
130 T const & t1,
131 T const & t2,
132 T const & t3);
133
136 template <typename T>
137 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXYX(
138 T const & t1,
139 T const & t2,
140 T const & t3);
141
144 template <typename T>
145 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYXY(
146 T const & t1,
147 T const & t2,
148 T const & t3);
149
152 template <typename T>
153 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYZY(
154 T const & t1,
155 T const & t2,
156 T const & t3);
157
160 template <typename T>
161 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZYZ(
162 T const & t1,
163 T const & t2,
164 T const & t3);
165
168 template <typename T>
169 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZXZ(
170 T const & t1,
171 T const & t2,
172 T const & t3);
173
176 template <typename T>
177 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXZY(
178 T const & t1,
179 T const & t2,
180 T const & t3);
181
184 template <typename T>
185 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYZX(
186 T const & t1,
187 T const & t2,
188 T const & t3);
189
192 template <typename T>
193 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZYX(
194 T const & t1,
195 T const & t2,
196 T const & t3);
197
200 template <typename T>
201 GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZXY(
202 T const & t1,
203 T const & t2,
204 T const & t3);
205
208 template<typename T>
209 GLM_FUNC_DECL mat<4, 4, T, defaultp> yawPitchRoll(
210 T const& yaw,
211 T const& pitch,
212 T const& roll);
213
216 template<typename T>
217 GLM_FUNC_DECL mat<2, 2, T, defaultp> orientate2(T const& angle);
218
221 template<typename T>
222 GLM_FUNC_DECL mat<3, 3, T, defaultp> orientate3(T const& angle);
223
226 template<typename T, qualifier Q>
227 GLM_FUNC_DECL mat<3, 3, T, Q> orientate3(vec<3, T, Q> const& angles);
228
231 template<typename T, qualifier Q>
232 GLM_FUNC_DECL mat<4, 4, T, Q> orientate4(vec<3, T, Q> const& angles);
233
236 template<typename T>
237 GLM_FUNC_DECL void extractEulerAngleXYZ(mat<4, 4, T, defaultp> const& M,
238 T & t1,
239 T & t2,
240 T & t3);
241
244 template <typename T>
245 GLM_FUNC_DECL void extractEulerAngleYXZ(mat<4, 4, T, defaultp> const & M,
246 T & t1,
247 T & t2,
248 T & t3);
249
252 template <typename T>
253 GLM_FUNC_DECL void extractEulerAngleXZX(mat<4, 4, T, defaultp> const & M,
254 T & t1,
255 T & t2,
256 T & t3);
257
260 template <typename T>
261 GLM_FUNC_DECL void extractEulerAngleXYX(mat<4, 4, T, defaultp> const & M,
262 T & t1,
263 T & t2,
264 T & t3);
265
268 template <typename T>
269 GLM_FUNC_DECL void extractEulerAngleYXY(mat<4, 4, T, defaultp> const & M,
270 T & t1,
271 T & t2,
272 T & t3);
273
276 template <typename T>
277 GLM_FUNC_DECL void extractEulerAngleYZY(mat<4, 4, T, defaultp> const & M,
278 T & t1,
279 T & t2,
280 T & t3);
281
284 template <typename T>
285 GLM_FUNC_DECL void extractEulerAngleZYZ(mat<4, 4, T, defaultp> const & M,
286 T & t1,
287 T & t2,
288 T & t3);
289
292 template <typename T>
293 GLM_FUNC_DECL void extractEulerAngleZXZ(mat<4, 4, T, defaultp> const & M,
294 T & t1,
295 T & t2,
296 T & t3);
297
300 template <typename T>
301 GLM_FUNC_DECL void extractEulerAngleXZY(mat<4, 4, T, defaultp> const & M,
302 T & t1,
303 T & t2,
304 T & t3);
305
308 template <typename T>
309 GLM_FUNC_DECL void extractEulerAngleYZX(mat<4, 4, T, defaultp> const & M,
310 T & t1,
311 T & t2,
312 T & t3);
313
316 template <typename T>
317 GLM_FUNC_DECL void extractEulerAngleZYX(mat<4, 4, T, defaultp> const & M,
318 T & t1,
319 T & t2,
320 T & t3);
321
324 template <typename T>
325 GLM_FUNC_DECL void extractEulerAngleZXY(mat<4, 4, T, defaultp> const & M,
326 T & t1,
327 T & t2,
328 T & t3);
329
331 }//namespace glm
332
333 #include "euler_angles.inl"
glm::angle
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
glm::extractEulerAngleZXZ
GLM_FUNC_DECL void extractEulerAngleZXZ(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Z * X * Z) Euler angles from the rotation matrix M.
glm::extractEulerAngleXYX
GLM_FUNC_DECL void extractEulerAngleXYX(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (X * Y * X) Euler angles from the rotation matrix M.
glm::eulerAngleZXY
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZXY(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X * Y).
glm::eulerAngleY
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleY(T const &angleY)
Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.
glm::eulerAngleZX
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZX(T const &angle, T const &angleX)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).
glm::derivedEulerAngleY
GLM_FUNC_DECL mat< 4, 4, T, defaultp > derivedEulerAngleY(T const &angleY, T const &angularVelocityY)
Creates a 3D 4 * 4 homogeneous derived matrix from the rotation matrix about Y-axis.
glm::roll
GLM_FUNC_DECL T roll(qua< T, Q > const &x)
Returns roll value of euler angles expressed in radians.
glm::extractEulerAngleYZY
GLM_FUNC_DECL void extractEulerAngleYZY(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Y * Z * Y) Euler angles from the rotation matrix M.
glm::orientate4
GLM_FUNC_DECL mat< 4, 4, T, Q > orientate4(vec< 3, T, Q > const &angles)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
glm::extractEulerAngleZYX
GLM_FUNC_DECL void extractEulerAngleZYX(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Z * Y * X) Euler angles from the rotation matrix M.
glm::derivedEulerAngleZ
GLM_FUNC_DECL mat< 4, 4, T, defaultp > derivedEulerAngleZ(T const &angleZ, T const &angularVelocityZ)
Creates a 3D 4 * 4 homogeneous derived matrix from the rotation matrix about Z-axis.
glm::orientate3
GLM_FUNC_DECL mat< 3, 3, T, Q > orientate3(vec< 3, T, Q > const &angles)
Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z).
glm::eulerAngleYX
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYX(T const &angleY, T const &angleX)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).
glm::eulerAngleYXZ
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYXZ(T const &yaw, T const &pitch, T const &roll)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
glm::eulerAngleXY
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXY(T const &angleX, T const &angleY)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).
glm::eulerAngleZYZ
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZYZ(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y * Z).
glm::eulerAngleX
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleX(T const &angleX)
Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.
glm::eulerAngleZ
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZ(T const &angleZ)
Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.
glm::yaw
GLM_FUNC_DECL T yaw(qua< T, Q > const &x)
Returns yaw value of euler angles expressed in radians.
glm::eulerAngleYZ
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYZ(T const &angleY, T const &angleZ)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).
glm::eulerAngleXYX
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXYX(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y * X).
glm::eulerAngleXZX
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXZX(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z * X).
glm::eulerAngleZY
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZY(T const &angleZ, T const &angleY)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).
glm::orientate2
GLM_FUNC_DECL mat< 2, 2, T, defaultp > orientate2(T const &angle)
Creates a 2D 2 * 2 rotation matrix from an euler angle.
glm::extractEulerAngleYXY
GLM_FUNC_DECL void extractEulerAngleYXY(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Y * X * Y) Euler angles from the rotation matrix M.
glm::eulerAngleXYZ
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXYZ(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y * Z).
glm::eulerAngleZXZ
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZXZ(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X * Z).
glm::pitch
GLM_FUNC_DECL T pitch(qua< T, Q > const &x)
Returns pitch value of euler angles expressed in radians.
glm::eulerAngleZYX
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZYX(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y * X).
glm::extractEulerAngleYXZ
GLM_FUNC_DECL void extractEulerAngleYXZ(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Y * X * Z) Euler angles from the rotation matrix M.
glm::extractEulerAngleZXY
GLM_FUNC_DECL void extractEulerAngleZXY(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Z * X * Y) Euler angles from the rotation matrix M.
glm::extractEulerAngleXYZ
GLM_FUNC_DECL void extractEulerAngleXYZ(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (X * Y * Z) Euler angles from the rotation matrix M.
glm::derivedEulerAngleX
GLM_FUNC_DECL mat< 4, 4, T, defaultp > derivedEulerAngleX(T const &angleX, T const &angularVelocityX)
Creates a 3D 4 * 4 homogeneous derived matrix from the rotation matrix about X-axis.
glm::extractEulerAngleXZY
GLM_FUNC_DECL void extractEulerAngleXZY(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (X * Z * Y) Euler angles from the rotation matrix M.
glm::eulerAngleYZX
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYZX(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z * X).
glm::eulerAngleYXY
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYXY(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Y).
glm::extractEulerAngleXZX
GLM_FUNC_DECL void extractEulerAngleXZX(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (X * Z * X) Euler angles from the rotation matrix M.
glm::eulerAngleYZY
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYZY(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z * Y).
glm::eulerAngleXZY
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXZY(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z * Y).
glm::extractEulerAngleYZX
GLM_FUNC_DECL void extractEulerAngleYZX(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Y * Z * X) Euler angles from the rotation matrix M.
glm::eulerAngleXZ
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXZ(T const &angleX, T const &angleZ)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).
glm::yawPitchRoll
GLM_FUNC_DECL mat< 4, 4, T, defaultp > yawPitchRoll(T const &yaw, T const &pitch, T const &roll)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
glm::extractEulerAngleZYZ
GLM_FUNC_DECL void extractEulerAngleZYZ(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Z * Y * Z) Euler angles from the rotation matrix M.