XMXDEC4 Structure

A 4D vector with x-,y-, and z- components represented as 10 bit signed integer values, and the w-component as a 2 bit unsigned integer value.

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.

Syntax

struct XMXDEC4  

Remarks

The fields in the XMXDEC4 structure are declared as follows:

struct XMXDEC4
{
    union
    {
        struct
        {
            int32_t x : 10; // Signed integer value in the range [-511, 511] 
                            // describing the x-coordinate of the vector.
            int32_t y : 10; // Signed integer value in the range [-511, 511] 
                            // describing the y-coordinate of the vector.
            int32_t z : 10; // Signed integer value in the range [-511, 511] 
                            // describing the z-coordinate of the vector.
            uint32_t w : 2; // Unsigned integer value in the range [0, 3] 
                            // describing the w-coordinate of the vector.
        };
        uint32_t v; // Unsigned 32-bit integer representing the 4D vector.
    };  

XMXDEC4 can be loaded into instances of XMVECTOR by using XMLoadXDec4.

Instances of XMVECTOR can be stored into an instance of XMXDEC4 with XMStoreXDec4.

Namespace: Use DirectX::PackedVector

Requirements

Header: Declared in directxpackedvector.h.