XMU555 structure (directxpackedvector.h)

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

For a list of additional functionality such as constructors and operators that are available using XMU555 when you are programming in C++, see XMU555 Extensions.

Syntax

struct XMU555 {
  union {
    struct {
      uint16_t x : 5;
      uint16_t y : 5;
      uint16_t z : 5;
      uint16_t w : 1;
    };
    uint16_t v;
  };
  void               XMU555();
  void               XMU555(
    const XMU555 & 
  );
  XMU555 &           operator=(
    const XMU555 & 
  );
  void               XMU555(
    XMU555 && 
  );
  XMU555 &           operator=(
    XMU555 && 
  );
  noexcept           XMU555(
    uint16_t Packed
  );
  noexcept           XMU555(
    uint8_t _x,
    uint8_t _y,
    uint8_t _z,
    bool    _w
  );
  noexcept           XMU555(
    const uint8_t *pArray,
    bool          _w
  );
  noexcept           XMU555(
    float _x,
    float _y,
    float _z,
    bool  _w
  );
  noexcept           XMU555(
    const float *pArray,
    bool        _w
  );
  noexcept           operator uint16_t();
  XMU555 &  noexcept operator=(
    uint16_t Packed
  );
};

Members

x

Unsigned 5-bit integer value in the range [0,31] describing the x-coordinate of the vector.

y

Unsigned 5-bit integer value in the range [0,31] describing the y-coordinate of the vector.

z

Unsigned 5-bit integer value in the range [0,31] describing the z-coordinate of the vector.

w

A 1-bit integer value in the range [0,31] describing the w-coordinate of the vector.

v

Unsigned short representing the 4D vector.

void XMU555()

Default constructor for XMU555

Default constructor for XMU555

Note  This is only available for C++ based development.
 

void XMU555( const XMU555 & )

A constructor for XMU555.

A constructor for XMU555.

Note  This is only available for C++ based development.

XMU555 & operator=( const XMU555 & )

void XMU555( XMU555 && )

A constructor for XMU555.

A constructor for XMU555.

Note  This is only available for C++ based development.

XMU555 & operator=( XMU555 && )

Assigns the vector component data from one instance of XMU555 to the current instance of XMU555.

This operator assigns the vector component data from one instance of XMU555 to the current instance of XMU555.

noexcept XMU555( uint16_t Packed)

Initializes a new instance of XMU555 from a uint16_t variable containing component data in a packed format.

This constructor initializes a new instance of XMU555 from a uint16_t variable containing component data in a packed format.

Note  This constructor is only available under C++.
 

noexcept XMU555( uint8_t _x, uint8_t _y, uint8_t _z, bool _w)

Initializes a new instance of XMU555 from three int8_t and one bool arguments.

This constructor initializes a new instance of XMU555 from three int8_t (specifying x-, y-, and z-components) and one bool (specifying a w-component) arguments.

Note  This is only available for C++ based development.

noexcept XMU555( const uint8_t *pArray, bool _w)

Initializes a new instance of XMU555 from a three element int8_t array and one bool argument.

This constructor initializes a new instance of XMU555 from a three element int8_t array (specifying x-, y- and z-components) and one <bool argument (specifying a w-component).

Note  This is only available for C++ based development.

noexcept XMU555( float _x, float _y, float _z, bool _w)

Initializes a new instance of XMU555 from three float and one bool arguments.

This constructor initializes a new instance of XMU555 from three float (specifying x-, y-, and z-components) and one bool (specifying the w-component) arguments.

Note  This constructor is only available under C++.
 

noexcept XMU555( const float *pArray, bool _w)

Initializes a new instance of XMU555 from a three element float array and one bool argument.

This constructor initializes a new instance of XMU555 from a three element float array (specifying x-, y- and z-components) and one bool argument (specifying a w-component).

Note  This is only available for C++ based development.

noexcept operator uint16_t()

Returns an instance of uint16_t containing the components of the XMU555 instance in a packed format.

This operator returns an instance of uint16_t containing the components of the XMU555 instance in a packed format.

Note  This operator is only available under C++.
 

XMU555 & noexcept operator=( uint16_t Packed)

Assigns the vector component data packed in an instance of uint16_t to the current instance of XMU555.

Assigns the vector component data packed in an instance of uint16_t to the current instance of XMU555.

Note  This operator is only available under C++.
 

Remarks

XMU555 can be loaded into instances of XMVECTOR by using XMLoadU555.

Instances of XMVECTOR can be stored into an instance of XMU555 with XMStoreU555.

Namespace: Use DirectX::PackedVector

Platform Requirements

Microsoft Visual Studio 2010 or Microsoft Visual Studio 2012 with the Windows SDK for Windows 8. Supported for Win32 desktop apps, Windows Store apps, and Windows Phone 8 apps.

Requirements

   
Header directxpackedvector.h

See also

DirectXMath Library Structures

XMU555 Extensions