XMSHORT4 Structure

A 4D vector consisting of 16-bit signed integer components.

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 XMSHORT4  

Remarks

The fields in the XMSHORT4 structure are declared as follows:

struct XMSHORT4
{
    union
    {
        struct
        {
            int16_t x; // Signed 16-bit integer in the range [-32767, 32767] 
                       // describing the x-coordinate of the vector.
            int16_t y; // Signed 16-bit integer in the range [-32767, 32767] 
                       // describing the y-coordinate of the vector.
            int16_t z; // Signed 16-bit integer in the range [-32767, 32767] 
                       // describing the z-coordinate of the vector.
            int16_t w; // Signed 16-bit integer in the range [-32767, 32767] 
                       // describing the w-coordinate of the vector.
        };
        uint64_t v; // Unsigned 64-bit integer representing the 4D vector.
    };  

XMSHORT4 can be loaded into instances of XMVECTOR by using XMLoadShort4.

Instances of XMVECTOR can be stored into an instance of XMSHORT4 with XMStoreShort4.

Namespace: Use DirectX::PackedVector

Requirements

Header: Declared in directxpackedvector.h.