XMStoreUDec4 関数 (directxpackedvector.h)

XMVECTORXMUDEC4に格納します。

構文

void XM_CALLCONV XMStoreUDec4(
  [out] XMUDEC4   *pDestination,
  [in]  FXMVECTOR V
) noexcept;

パラメーター

[out] pDestination

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

[in] V

格納するデータを含むベクター。

戻り値

[なし] :

解説

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

XMVECTOR N;	
static const XMVECTOR  Max = {1023.0f, 1023.0f, 1023.0f, 3.0f};

assert(pDestination);

N = XMVectorClamp(V, XMVectorZero(), Max);

pDestination->v = ((uint32_t)N.v[3] << 30) |
                  (((uint32_t)N.v[2] & 0x3FF) << 20) |
                  (((uint32_t)N.v[1] & 0x3FF) << 10) |
                  (((uint32_t)N.v[0] & 0x3FF));

プラットフォームの要件

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

要件

要件
対象プラットフォーム Windows
ヘッダー directxpackedvector.h (DirectXPackedVector.h を含む)

こちらもご覧ください

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