Click or drag to resize
DigitalRuneMatrix44FDecompose Method (Vector3F, QuaternionF, Vector3F)
Decomposes the matrix into the scale, translation, and rotation components.

Namespace: DigitalRune.Mathematics.Algebra
Assembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax
public bool Decompose(
	out Vector3F scale,
	out QuaternionF rotation,
	out Vector3F translation
)

Parameters

scale
Type: DigitalRune.Mathematics.AlgebraVector3F
The scale component of the matrix.
rotation
Type: DigitalRune.Mathematics.AlgebraQuaternionF
The rotation component of the matrix.
translation
Type: DigitalRune.Mathematics.AlgebraVector3F
The translation component of the matrix.

Return Value

Type: Boolean
if the matrix was successfully decomposed; otherwise, .
Remarks

This method assumes that the matrix is a 3D scale/rotation/translation (SRT) matrix. Decompose(Vector3F, QuaternionF, Vector3F) returns when the matrix is not a valid SRT matrix. This is the case when two or more of the scale values are 0 or the last row of the matrix is something other than (0, 0, 0, 1).

DecomposeFast(Vector3F, QuaternionF, Vector3F) is a faster version of this method that can be used when it is certain that the matrix is a valid SRT matrix.

Examples
The following example shows how to compose the matrix scale, rotation, and translation components.
Matrix44F srt = Matrix44F.CreateTranslation(translation)
                * Matrix44F.CreateRotation(rotation)
                * Matrix44F.CreateScale(scale);
See Also