0.9.9 API documenation
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 #endif
24 
25 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
26 # pragma message("GLM: GLM_GTX_euler_angles extension included")
27 #endif
28 
29 namespace glm
30 {
33 
36  template<typename T>
37  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleX(
38  T const& angleX);
39 
42  template<typename T>
43  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleY(
44  T const& angleY);
45 
48  template<typename T>
49  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZ(
50  T const& angleZ);
51 
54  template <typename T>
55  GLM_FUNC_DECL mat<4, 4, T, defaultp> derivedEulerAngleX(
56  T const & angleX, T const & angularVelocityX);
57 
60  template <typename T>
61  GLM_FUNC_DECL mat<4, 4, T, defaultp> derivedEulerAngleY(
62  T const & angleY, T const & angularVelocityY);
63 
66  template <typename T>
67  GLM_FUNC_DECL mat<4, 4, T, defaultp> derivedEulerAngleZ(
68  T const & angleZ, T const & angularVelocityZ);
69 
72  template<typename T>
73  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXY(
74  T const& angleX,
75  T const& angleY);
76 
79  template<typename T>
80  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYX(
81  T const& angleY,
82  T const& angleX);
83 
86  template<typename T>
87  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXZ(
88  T const& angleX,
89  T const& angleZ);
90 
93  template<typename T>
94  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZX(
95  T const& angle,
96  T const& angleX);
97 
100  template<typename T>
101  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYZ(
102  T const& angleY,
103  T const& angleZ);
104 
107  template<typename T>
108  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZY(
109  T const& angleZ,
110  T const& angleY);
111 
114  template<typename T>
115  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXYZ(
116  T const& t1,
117  T const& t2,
118  T const& t3);
119 
122  template<typename T>
123  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYXZ(
124  T const& yaw,
125  T const& pitch,
126  T const& roll);
127 
130  template <typename T>
131  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXZX(
132  T const & t1,
133  T const & t2,
134  T const & t3);
135 
138  template <typename T>
139  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXYX(
140  T const & t1,
141  T const & t2,
142  T const & t3);
143 
146  template <typename T>
147  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYXY(
148  T const & t1,
149  T const & t2,
150  T const & t3);
151 
154  template <typename T>
155  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYZY(
156  T const & t1,
157  T const & t2,
158  T const & t3);
159 
162  template <typename T>
163  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZYZ(
164  T const & t1,
165  T const & t2,
166  T const & t3);
167 
170  template <typename T>
171  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZXZ(
172  T const & t1,
173  T const & t2,
174  T const & t3);
175 
178  template <typename T>
179  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXZY(
180  T const & t1,
181  T const & t2,
182  T const & t3);
183 
186  template <typename T>
187  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYZX(
188  T const & t1,
189  T const & t2,
190  T const & t3);
191 
194  template <typename T>
195  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZYX(
196  T const & t1,
197  T const & t2,
198  T const & t3);
199 
202  template <typename T>
203  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZXY(
204  T const & t1,
205  T const & t2,
206  T const & t3);
207 
210  template<typename T>
211  GLM_FUNC_DECL mat<4, 4, T, defaultp> yawPitchRoll(
212  T const& yaw,
213  T const& pitch,
214  T const& roll);
215 
218  template<typename T>
219  GLM_FUNC_DECL mat<2, 2, T, defaultp> orientate2(T const& angle);
220 
223  template<typename T>
224  GLM_FUNC_DECL mat<3, 3, T, defaultp> orientate3(T const& angle);
225 
228  template<typename T, qualifier Q>
229  GLM_FUNC_DECL mat<3, 3, T, Q> orientate3(vec<3, T, Q> const& angles);
230 
233  template<typename T, qualifier Q>
234  GLM_FUNC_DECL mat<4, 4, T, Q> orientate4(vec<3, T, Q> const& angles);
235 
238  template<typename T>
239  GLM_FUNC_DECL void extractEulerAngleXYZ(mat<4, 4, T, defaultp> const& M,
240  T & t1,
241  T & t2,
242  T & t3);
243 
246  template <typename T>
247  GLM_FUNC_DECL void extractEulerAngleYXZ(mat<4, 4, T, defaultp> const & M,
248  T & t1,
249  T & t2,
250  T & t3);
251 
254  template <typename T>
255  GLM_FUNC_DECL void extractEulerAngleXZX(mat<4, 4, T, defaultp> const & M,
256  T & t1,
257  T & t2,
258  T & t3);
259 
262  template <typename T>
263  GLM_FUNC_DECL void extractEulerAngleXYX(mat<4, 4, T, defaultp> const & M,
264  T & t1,
265  T & t2,
266  T & t3);
267 
270  template <typename T>
271  GLM_FUNC_DECL void extractEulerAngleYXY(mat<4, 4, T, defaultp> const & M,
272  T & t1,
273  T & t2,
274  T & t3);
275 
278  template <typename T>
279  GLM_FUNC_DECL void extractEulerAngleYZY(mat<4, 4, T, defaultp> const & M,
280  T & t1,
281  T & t2,
282  T & t3);
283 
286  template <typename T>
287  GLM_FUNC_DECL void extractEulerAngleZYZ(mat<4, 4, T, defaultp> const & M,
288  T & t1,
289  T & t2,
290  T & t3);
291 
294  template <typename T>
295  GLM_FUNC_DECL void extractEulerAngleZXZ(mat<4, 4, T, defaultp> const & M,
296  T & t1,
297  T & t2,
298  T & t3);
299 
302  template <typename T>
303  GLM_FUNC_DECL void extractEulerAngleXZY(mat<4, 4, T, defaultp> const & M,
304  T & t1,
305  T & t2,
306  T & t3);
307 
310  template <typename T>
311  GLM_FUNC_DECL void extractEulerAngleYZX(mat<4, 4, T, defaultp> const & M,
312  T & t1,
313  T & t2,
314  T & t3);
315 
318  template <typename T>
319  GLM_FUNC_DECL void extractEulerAngleZYX(mat<4, 4, T, defaultp> const & M,
320  T & t1,
321  T & t2,
322  T & t3);
323 
326  template <typename T>
327  GLM_FUNC_DECL void extractEulerAngleZXY(mat<4, 4, T, defaultp> const & M,
328  T & t1,
329  T & t2,
330  T & t3);
331 
333 }//namespace glm
334 
335 #include "euler_angles.inl"
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_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_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_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_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_FUNC_DECL T angle(tquat< T, Q > const &x)
Returns the quaternion rotation angle.
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_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_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_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_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_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_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_FUNC_DECL T pitch(tquat< T, Q > const &x)
Returns pitch value of euler angles expressed in radians.
GLM_FUNC_DECL T yaw(tquat< T, Q > const &x)
Returns yaw value of euler angles expressed in radians.
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_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_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_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_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.
Definition: common.hpp:20
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_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_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_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_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_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_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_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_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_FUNC_DECL T roll(tquat< T, Q > const &x)
Returns roll value of euler angles expressed in radians.
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_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_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_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_FUNC_DECL mat< 2, 2, T, defaultp > orientate2(T const &angle)
Creates a 2D 2 * 2 rotation matrix from an euler angle.
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_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_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.
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_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_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_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_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_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).