A 4D vector with x-,y-, and z- components represented as 5 bit unsigned integer values, and the w-component as a 1 bit integer value.
If you are programming in C++, you can use the constructors and operator methods of this structure.
struct XMU555
The fields in the XMU555 structure are declared as follows:
struct XMU555
{
union
{
struct
{
uint16_t x : 5; // Unsigned 5-bit integer value in the range [0,31]
// describing the x-coordinate of the vector.
uint16_t y : 5; // Unsigned 5-bit integer value in the range [0,31]
// describing the y-coordinate of the vector.
uint16_t z : 5; // Unsigned 5-bit integer value in the range [0,31]
// describing the z-coordinate of the vector.
uint16_t w : 1; // A 1-bit integer value in the range [0,31]
// describing the w-coordinate of the vector.
};
uint16_t v; // Unsigned 16-bit short representing the 4D vector.
};
XMU555 can be loaded into instances of XMVECTOR by using XMLoadU555.
Instances of XMVECTOR can be stored into an instance of XMU555 with XMStoreU555.
Namespace: Use DirectX::PackedVector
Header: Declared in directxpackedvector.h.