XMStoreFloat4x3-Funktion (directxmath.h)

Speichert eine XMMATRIX in einem XMFLOAT4X3.

Syntax

void XM_CALLCONV XMStoreFloat4x3(
  [out] XMFLOAT4X3 *pDestination,
  [in]  FXMMATRIX  M
) noexcept;

Parameter

[out] pDestination

Adresse, an der die Daten gespeichert werden sollen.

[in] M

Matrix mit den zu speichernden Daten.

Rückgabewert

Keine.

Hinweise

XMFLOAT4X3 ist ein Zeilen-Hauptmatrixformular. Diese Funktion kann nicht zum Schreiben von Spaltenhauptdaten verwendet werden, da sie davon ausgeht, dass die letzte Spalte 0 0 0 1 ist.

Diese Funktion übernimmt eine Matrix und schreibt die Komponenten auf zwölf Gleitkommawerte mit einer Genauigkeit an der angegebenen Adresse. Die wichtigste Komponente des ersten Zeilenvektors wird in die ersten vier Bytes der Adresse geschrieben, gefolgt von der zweitwissigen Komponente der ersten Zeile, gefolgt von der drittwidmsten Komponente der ersten Zeile. Die wichtigsten drei Komponenten der zweiten Zeile werden dann in einer ähnlichen Weise wie der Arbeitsspeicher ab Byte 12, gefolgt von der dritten Zeile zum Speicher ab Byte 24 und schließlich die vierte Zeile zum Speicher ab Byte 36 geschrieben.

Der folgende Pseudocode veranschaulicht den Betrieb der Funktion.

pDestination->_11 = M[0].x; // 4 bytes to address (uint8_t*)pDestination
pDestination->_12 = M[0].y; // 4 bytes to address (uint8_t*)pDestination + 4
pDestination->_13 = M[0].z; // 4 bytes to address (uint8_t*)pDestination + 8

pDestination->_21 = M[1].x; // 4 bytes to address (uint8_t*)pDestination + 12
pDestination->_22 = M[1].y; // 4 bytes to address (uint8_t*)pDestination + 16
pDestination->_23 = M[1].z; // 4 bytes to address (uint8_t*)pDestination + 20

pDestination->_31 = M[2].x; // 4 bytes to address (uint8_t*)pDestination + 24
pDestination->_32 = M[2].y; // 4 bytes to address (uint8_t*)pDestination + 28
pDestination->_33 = M[2].z; // 4 bytes to address (uint8_t*)pDestination + 32

pDestination->_41 = M[3].x; // 4 bytes to address (uint8_t*)pDestination + 36
pDestination->_42 = M[3].y; // 4 bytes to address (uint8_t*)pDestination + 40
pDestination->_43 = M[3].z; // 4 bytes to address (uint8_t*)pDestination + 44

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 directxmath.h

Weitere Informationen

Vektorspeicherfunktionen der DirectXMath-Bibliothek