Describes a 4D vector where each component is a unsigned integer, 8-bits (1 byte) in length.
A 4D vector where each component is a unsigned integer, 8-bits (1 byte) in length.
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 XMUBYTE4
The fields in the XMUBYTE4 structure are declared as follows:
struct XMUBYTE4
{
union
{
struct
{
uint8_t x; // Unsigned 8-bit integer value in the range [0, 255]
// describing the x-coordinate of the vector.
uint8_t y; // Unsigned 8-bit integer value in the range [0, 255]
// describing the y-coordinate of the vector.
uint8_t z; // Unsigned 8-bit integer value in the range [0, 255]
// describing the z-coordinate of the vector.
uint8_t w; // Unsigned 8-bit integer value in the range [0, 255]
// describing the w-coordinate of the vector.
};
uint32_t v; // Unsigned 32-bit 8-bit integer representing the 4D vector.
};
XMUBYTE4 can be loaded into instances of XMVECTOR by using XMLoadUByte4.
Instances of XMVECTOR can be stored into an instance of XMUBYTE4 with XMStoreUByte4.
Namespace: Use DirectX::PackedVector
Header: Declared in directxpackedvector.h.