XMStoreFloat4x4 함수(directxmath.h)

XMMATRIXXMFLOAT4X4 저장합니다.

구문

void XM_CALLCONV XMStoreFloat4x4(
  [out] XMFLOAT4X4 *pDestination,
  [in]  FXMMATRIX  M
) noexcept;

매개 변수

[out] pDestination

데이터를 저장할 주소입니다.

[in] M

저장할 데이터를 포함하는 행렬입니다.

반환 값

없음

설명

XMFLOAT4X4 행 주 행렬 형식입니다. 열 주 데이터를 작성하려면 저장소 함수를 호출하기 전에 XMMATRIX를 XMMatrixTranpose 를 통해 변환해야 합니다.

이 함수는 행렬을 사용하고 지정된 주소에서 16개의 단정밀도 부동 소수점 값에 구성 요소를 씁니다. 첫 번째 행 벡터의 가장 중요한 구성 요소는 주소의 처음 4바이트 다음에 첫 번째 행의 두 번째로 중요한 구성 요소 등에 기록됩니다. 그런 다음 두 번째 행은 바이트 16부터 메모리에 대해 같은 방식으로 작성되고, 그 다음에는 세 번째 행이 바이트 32부터 메모리로, 마지막으로 네 번째 행이 바이트 48부터 메모리로 기록됩니다.

다음 의사 코드는 함수의 작업을 보여 줍니다.

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->_14 = M[0].w; // 4 bytes to address (uint8_t*)pDestination + 12

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

pDestination->_31 = M[2].x; // 4 bytes to address (uint8_t*)pDestination + 32
pDestination->_32 = M[2].y; // 4 bytes to address (uint8_t*)pDestination + 36
pDestination->_33 = M[2].z; // 4 bytes to address (uint8_t*)pDestination + 40
pDestination->_34 = M[2].w; // 4 bytes to address (uint8_t*)pDestination + 44

pDestination->_41 = M[3].x; // 4 bytes to address (uint8_t*)pDestination + 48
pDestination->_42 = M[3].y; // 4 bytes to address (uint8_t*)pDestination + 52
pDestination->_43 = M[3].z; // 4 bytes to address (uint8_t*)pDestination + 56
pDestination->_44 = M[3].w; // 4 bytes to address (uint8_t*)pDestination + 60

플랫폼 요구 사항

Windows 8 Windows SDK Microsoft Visual Studio 2010 또는 Microsoft Visual Studio 2012. Win32 데스크톱 앱, Windows 스토어 앱 및 Windows Phone 8개 앱에 지원됩니다.

요구 사항

요구 사항
대상 플랫폼 Windows
헤더 directxmath.h

추가 정보

DirectXMath 라이브러리 벡터 저장소 함수