XMStoreDecN4 函数 (directxpackedvector.h)

XMVECTOR 存储在 XMDECN4 中。

语法

void XM_DEPRECATED XM_CALLCONV XMStoreDecN4(
  [out] XMDECN4   *pDestination,
  [in]  FXMVECTOR V
) noexcept;

参数

[out] pDestination

存储数据的地址。

[in] V

包含要存储的数据的向量。

返回值

无。

备注

以下伪代码演示函数的操作。

XMVECTOR N;	
static const XMVECTOR  Scale = {511.0f, 511.0f, 511.0f, 1.0f};

N = XMVectorClamp(V, g_XMNegativeOne, g_XMOne);
N = XMVectorMultiply(N, Scale);

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

平台要求

带有 Windows SDK for Windows 8 的 Microsoft Visual Studio 2010 或 Microsoft Visual Studio 2012。 支持 Win32 桌面应用、Windows 应用商店应用和 Windows Phone 8 应用。

要求

   
目标平台 Windows
标头 directxpackedvector.h (包括 DirectXPackedVector.h)

请参阅

DirectXMath 库矢量存储函数