Share via


XMStoreDecN4-Funktion (directxpackedvector.h)

Speichert einen XMVECTOR in einem XMDECN4.

Syntax

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

Parameter

[out] pDestination

Adresse, an der die Daten gespeichert werden sollen.

[in] V

Vektor mit den zu speichernden Daten.

Rückgabewert

Keine.

Hinweise

Der folgende Pseudocode veranschaulicht den Vorgang der Funktion.

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));

Plattformanforderungen

Microsoft Visual Studio 2010 oder Microsoft Visual Studio 2012 mit dem Windows SDK für Windows 8. Unterstützt für Win32-Desktop-Apps, Windows Store-Apps und Windows Phone 8-Apps.

Anforderungen

   
Zielplattform Windows
Kopfzeile directxpackedvector.h (directXPackedVector.h einschließen)

Weitere Informationen

Vektorspeicherfunktionen der DirectXMath-Bibliothek