XMMatrixDecompose

Breaks down a general 3D transformation matrix into its scalar, rotational, and translational components.

Syntax

bool XMMatrixDecompose(
         XMVECTOR *outScale,
         XMVECTOR *outRotQuat,
         XMVECTOR *outTrans,
         CXMMATRIX M
)  

Parameters

outScale
Type: XMVECTOR *

[out]

Pointer to the output XMVECTOR that contains scaling factors applied along the x, y, and z-axes.

outRotQuat
Type: XMVECTOR *

[out]

Pointer to the XMVECTOR quaternion that describes the rotation.

outTrans
Type: XMVECTOR *

[out]

Pointer to the XMVECTOR vector that describes a translation along the x, y, and z-axes.

M
Type: CXMMATRIX 

[in]

Pointer to an input XMMATRIX matrix to decompose.

Return value

Type: bool 

If the function succeeds, the return value is true. If the function fails, the return value is false.

Remarks

XMMatrixDecompose provides the same basic functionality found in D3DXMatrixDecompose (Direct3D 10).

Requirements

Header: Declared in directxmath.h.