XMStoreUInt4 函式 (directxmath.h)

XMVECTOR 中的不帶正負號的整數資料儲存在 XMUINT4 結構中。

語法

void XM_CALLCONV XMStoreUInt4(
  [out] XMUINT4   *pDestination,
        FXMVECTOR V
) noexcept;

參數

[out] pDestination

要在其中儲存資料的 XMUINT4 結構位址。

V

包含要儲存之資料的向量。

傳回值

無。

備註

針對 16 位元組對齊的記憶體,使用 XMStoreInt4A 搭配轉型運算子可能會更快。

下列虛擬程式碼顯示此函式的作業。


XMVECTOR N;	

assert(pDestination);

N = XMVectorClamp(V, XMVectorZero(), MaxUInt );
N = XMVectorRound(N);

pDestination->x = (uint32_t)N.v[0];
pDestination->y = (uint32_t)N.v[1];
pDestination->z = (uint32_t)N.v[2];
pDestination->w = (uint32_t)N.v[3];

    

平臺需求

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

需求

   
目標平台 Windows
標頭 directxmath.h

另請參閱

DirectXMath 程式庫向量存放區函式