共用方式為


XMMatrixDecompose 函式 (directxmath.h)

將一般 3D 轉換矩陣細分為其純量、旋轉和轉譯元件。

語法

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

參數

[in, out] outScale

輸出 XMVECTOR 的指標,其中包含沿著 x、y 和 Z 軸套用的縮放因數。

[in, out] outRotQuat

描述旋轉的 XMVECTOR 四元數指標。

[in, out] outTrans

XMVECTOR向量的指標,描述沿著 x、y 和 Z 軸的翻譯。

[in] M

要分解之輸入 XMMATRIX 矩陣的指標。

傳回值

如果函式成功,則傳回值為 true。 如果函式失敗,則傳回值為 false。

備註

XMMatrixDecompose 提供 在 D3DXMatrixDecompose (Direct3D 9) D3DXMatrixDecompose (Direct3D 10) 中找到的相同基本功能。

平臺需求

Microsoft Visual Studio 2010 或 Microsoft Visual Studio 2012 搭配 Windows SDK for Windows 8。 支援 Win32 傳統型應用程式、Windows 市集應用程式和 Windows Phone 8 個應用程式。

需求

   
目標平台 Windows
標頭 directxmath.h

另請參閱

DirectXMath 程式庫矩陣函式