XMStoreFloat3x3 関数 (directxmath.h)

XMMATRIXXMFLOAT3X3に格納します。

構文

void XM_CALLCONV XMStoreFloat3x3(
  [out] XMFLOAT3X3 *pDestination,
  [in]  FXMMATRIX  M
) noexcept;

パラメーター

[out] pDestination

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

[in] M

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

戻り値

[なし] :

解説

XMFLOAT3X3 は行主行列形式です。 列メジャー データを書き出すには、ストア関数を呼び出す前に 、XMMATRIX を XMMatrixTranpose 経由で入れ替える必要があります。

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

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

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

プラットフォームの要件

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

要件

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

こちらもご覧ください

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