XMStoreXDecN4 함수(directxpackedvector.h)

XMXDECN4XMVECTOR를 저장합니다.

구문

void XM_CALLCONV XMStoreXDecN4(
  [out] XMXDECN4  *pDestination,
  [in]  FXMVECTOR V
) noexcept;

매개 변수

[out] pDestination

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

[in] V

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

반환 값

없음

설명

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

XMVECTOR N;	
static const XMVECTOR  Min = {-1.0f, -1.0f, -1.0f, 0.0f};
static const XMVECTOR  Scale = {511.0f, 511.0f, 511.0f, 3.0f};

assert(pDestination);

N = XMVectorClamp(V, Min, g_XMOne);
N = XMVectorMultiply(N, Scale);
N = XMVectorRound(N);

pDestination->v = ((uint32_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));

플랫폼 요구 사항

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

요구 사항

   
대상 플랫폼 Windows
헤더 directxpackedvector.h(DirectXPackedVector.h 포함)

추가 정보

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