Quaternion::SetRotationMatrix
Defined in:
Converts a 3 × 3 matrix to a quaternion.
TSQuaternion.h
Prototype
Quaternion& SetRotationMatrix(const Matrix3D& M);
Parameters
M |
The matrix to convert to a quaternion. |
Description
The SetRotationMatrix
function sets the components of a quaternion to values that represent the same rotation as the one represented by the matrix specified by the M
parameter.This function expects the matrix
M
to be orthogonal and have a determinant of +1. If these conditions are not met, then the results are unlikely to be meaningful.
See Also