次の方法で共有


XMStoreSInt4 関数 (directxmath.h)

XMVECTOR からの符号付き整数データを XMINT4 構造体に格納します。

構文

void XM_CALLCONV XMStoreSInt4(
  [out] XMINT4    *pDestination,
        FXMVECTOR V
) noexcept;

パラメーター

[out] pDestination

データを格納する XMINT4 構造体のアドレス。

V

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

戻り値

[なし] :

解説

16 バイトのアラインド メモリの場合、キャスト演算子で XMStoreInt4A を使用する方が高速な場合があります。

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


XMVECTOR N;	

assert(pDestination);

N = XMVectorClamp(V, MinInt, MaxInt );
N = XMVectorRound(N);

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

    

プラットフォームの要件

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

要件

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

関連項目

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