The extended matrix of transformation in a three-dimensional space.
void ExtractEulerAngles |
( |
const MbMatrix3D & |
trans, |
|
|
double & |
alpha, |
|
|
double & |
betta, |
|
|
double & |
gamma |
|
) |
| |
Extract the Euler angles from the rotational submatrix R = Rx*Ry*Rz.
- Parameters
-
[in] | trans | - The transformation matrix containing the rotational sub-matrix. |
[out] | alpha | - Angle of rotation around the "X" axis extracted from the rotation matrix. |
[out] | betta | - Angle of rotation around the "Y" axis extracted from the rotation matrix. |
[out] | gamma | - Angle of rotation around the "Z" axis extracted from the rotation matrix. |
The function factorizes the rotation submatrix into elementary rotations about the axes: R = Rx * Ry * Rz, given in the form of angular values, namely the values in radians, specifying the rotation sub-matrix R of the given trans in the form of a combination (product) of three elementary rotations: R = Rx * Ry * Rz , where
Rx = Rx(alpha) - rotation around X-axis,
Ry = Ry(betta) - rotation around Y-axis,
Rz = Rz(gamma) - rotation around Z-axis and
R is a rotational 3x3 sub-matrix from the matrix trans.
The matrix trans can contain any transformations including the scaling and the shear. The ExtractEulerAngles method extracts from the given matrix a rotating component and decomposes it into three rotations: Rx( alpha ), Ry( betta ), Rz( gamma ).