C4 Engine
C4 Engine API Documentation

Quaternion::SetRotationMatrix

Defined in:  TSQuaternion.h
Converts a 3 × 3 matrix to a quaternion.
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

Quaternion::GetRotationMatrix

Quaternion::MakeRotationX

Quaternion::MakeRotationY

Quaternion::MakeRotationZ

Quaternion::MakeRotation