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