XMMatrixDecompose function (directxmath.h)

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

Syntax

bool XM_CALLCONV XMMatrixDecompose(
  [in, out] XMVECTOR  *outScale,
  [in, out] XMVECTOR  *outRotQuat,
  [in, out] XMVECTOR  *outTrans,
  [in]      FXMMATRIX M
) noexcept;

Parameters

[in, out] outScale

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

[in, out] outRotQuat

Pointer to the XMVECTOR quaternion that describes the rotation.

[in, out] outTrans

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

[in] 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

Requirement Value
Target Platform Windows
Header directxmath.h

See also

DirectXMath Library Matrix Functions