Share via


XMStoreFloat4x3 関数 (directxmath.h)

XMFLOAT4X3XMMATRIX を格納します。

構文

void XM_CALLCONV XMStoreFloat4x3(
  [out] XMFLOAT4X3 *pDestination,
  [in]  FXMMATRIX  M
) noexcept;

パラメーター

[out] pDestination

データを格納するアドレス。

[in] M

格納するデータを含むマトリックス。

戻り値

[なし] :

解説

XMFLOAT4X3 は、行メジャー 行列形式です。 この関数は、最後の列が 0 0 0 1 であると仮定しているため、列メジャー データを書き出すために使用できません。

この関数は行列を受け取り、指定されたアドレスで 12 個の単精度浮動小数点値にコンポーネントを書き込みます。 最初の行ベクトルの最も重要なコンポーネントは、アドレスの最初の 4 バイトに書き込まれ、その後に最初の行の 2 番目に重要なコンポーネントが続き、その後に最初の行の 3 番目に重要なコンポーネントが書き込まれます。 次に、2 行目の最も重要な 3 つのコンポーネントが、バイト 12 で始まるメモリに同様の方法で書き込まれ、次に 3 行目がバイト 24 で始まり、最後に 4 行目がバイト 36 で始まるメモリに書き込まれます。

次の擬似コードは、 関数の操作を示しています。

pDestination->_11 = M[0].x; // 4 bytes to address (uint8_t*)pDestination
pDestination->_12 = M[0].y; // 4 bytes to address (uint8_t*)pDestination + 4
pDestination->_13 = M[0].z; // 4 bytes to address (uint8_t*)pDestination + 8

pDestination->_21 = M[1].x; // 4 bytes to address (uint8_t*)pDestination + 12
pDestination->_22 = M[1].y; // 4 bytes to address (uint8_t*)pDestination + 16
pDestination->_23 = M[1].z; // 4 bytes to address (uint8_t*)pDestination + 20

pDestination->_31 = M[2].x; // 4 bytes to address (uint8_t*)pDestination + 24
pDestination->_32 = M[2].y; // 4 bytes to address (uint8_t*)pDestination + 28
pDestination->_33 = M[2].z; // 4 bytes to address (uint8_t*)pDestination + 32

pDestination->_41 = M[3].x; // 4 bytes to address (uint8_t*)pDestination + 36
pDestination->_42 = M[3].y; // 4 bytes to address (uint8_t*)pDestination + 40
pDestination->_43 = M[3].z; // 4 bytes to address (uint8_t*)pDestination + 44

プラットフォームの要件

Windows SDK for Windows 8 を使用する Microsoft Visual Studio 2010 または Microsoft Visual Studio 2012。 Win32 デスクトップ アプリ、Windows ストア アプリ、Windows Phone 8 アプリでサポートされます。

要件

   
対象プラットフォーム Windows
ヘッダー directxmath.h

関連項目

DirectXMath ライブラリ ベクター ストア関数