A 4D vector where each component is a signed 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 XMBYTE4
The fields in the XMBYTE4 structure are declared as follows:
struct XMBYTE4
{
union
{
struct
{
int8_t x; // Signed 8-bit integer value in the range [-127, 127]
// describing the x-coordinate of the vector.
int8_t y; // Signed 8-bit integer value in the range [-127, 127]
// describing the y-coordinate of the vector.
int8_t z; // Signed 8-bit integer value in the range [-127, 127]
// describing the z-coordinate of the vector.
int8_t w; // Signed 8-bit integer value in the range [-127, 127]
// describing the w-coordinate of the vector.
};
uint32_t v; // Unsigned 32-bit integer representing the 4D vector.
};
XMBYTE4 can be loaded into instances of XMVECTOR by using XMLoadByte4.
Instances of XMVECTOR can be stored into an instance of XMBYTE4 with XMStoreByte4.
Namespace: Use DirectX::PackedVector
Header: Declared in directxpackedvector.h.