Click or drag to resize

UnitQuaternion Constructor (Matrix3By3)

Initializes a set of UnitQuaternion coordinates from the provided rotation matrix (Matrix3By3). Note that if the given matrix is not an orthogonal rotation matrix, it will create a non-unit UnitQuaternion and could cause problems in code which assumes that the UnitQuaternion represents a rotation.

Namespace:  AGI.Foundation.Coordinates
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.1.418.0 (24.1.418.0)
Syntax
public UnitQuaternion(
	Matrix3By3 matrix
)

Parameters

matrix
Type: AGI.Foundation.CoordinatesMatrix3By3
The 3-by-3 rotation matrix.
Remarks
For performance reasons, there is no check to ensure that the matrix is a unit rotation prior to converting to a unit quaternion. If necessary, the surrounding code is responsible for ensuring that the given matrix is a valid orthogonal rotation matrix. One simple way to ensure a valid UnitQuaternion is to first create a Quaternion from the Matrix3By3 and then Normalize the quaternion to produce a UnitQuaternion.
See Also