XMMatrixDecompose function

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

Syntax

bool XM_CALLCONV XMMatrixDecompose(
  XMVECTOR  *outScale,
  XMVECTOR  *outRotQuat,
  XMVECTOR  *outTrans,
  FXMMATRIX M
);

Parameters

outScale

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

outRotQuat

Pointer to the XMVECTOR quaternion that describes the rotation.

outTrans

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

M

Pointer to an input XMMATRIX matrix to decompose.

Return Value

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 both D3DXMatrixDecompose (Direct3D 9) and D3DXMatrixDecompose (Direct3D 10).

Platform Requirements

Microsoft Visual Studio 2010 or Microsoft Visual Studio 2012 with the Windows SDK for Windows 8. Supported for Win32 desktop apps, Windows Store apps, and Windows Phone 8 apps.

Requirements

   
Target Platform Windows
Header directxmath.h

See Also

DirectXMath Library Matrix Functions