A 4D vector consisting of 16-bit unsigned integer components.
If you are programming in C++, you can use the constructors and operator methods of this structure.
Note See DirectXMath Library Type Equivalences for information about equivalent D3DDECLTYPE, D3DFORMAT, and DXGI_FORMAT objects.
struct XMUSHORT4
The fields in the XMUSHORT4 structure are declared as follows:
struct XMUSHORT4
{
union
{
struct
{
uint16_t x; // Unsigned 16-bit integer in the range [0, 65535]
// describing the x-coordinate of the vector.
uint16_t y; // Unsigned 16-bit integer in the range [0, 65535]
// describing the y-coordinate of the vector.
uint16_t z; // Unsigned 16-bit integer in the range [0, 65535]
// describing the z-coordinate of the vector.
uint16_t w; // Unsigned 16-bit integer in the range [0, 65535]
// describing the w-coordinate of the vector.
};
uint64_t v; // Unsigned 64-bit integer representing the 4D vector.
};
XMUSHORT4 can be loaded into instances of XMVECTOR by using XMLoadUShort4.
Instances of XMVECTOR can be stored into an instance of XMUSHORT4 with XMStoreUShort4.
Namespace: Use DirectX::PackedVector
Header: Declared in directxpackedvector.h.