D3DXMatrixDecompose
Microsoft DirectX 9.0 SDK Update (October 2004)

D3DXMatrixDecompose Function


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

Syntax

HRESULT WINAPI D3DXMatrixDecompose(      

    D3DXVECTOR3 *pOutScale,     D3DXQUATERNION *pOutRotation,     D3DXVECTOR3 *pOutTranslation,     const D3DXMATRIX *pM );

Parameters

pOutScale
[in, out] Pointer to the output D3DXVECTOR3 that contains scaling factors applied along the x, y, and z-axes.
pOutRotation
[in, out] Pointer to the D3DXQUATERNION structure that describes the rotation.
pOutTranslation
[in, out] Pointer to the D3DXVECTOR3 vector that describes the translation.
pM
[in] Pointer to an input D3DXMATRIX matrix to decompose.

Return Value

If the function succeeds, the return value is S_OK.

If the function fails, the return value can be the following:

D3DERR_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.


Function Information

Headerd3dx9math.h
Import libraryd3dx9.lib
Minimum operating systems Windows 98


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.