XMUNIBBLE4 structure (directxpackedvector.h)

A 4D vector with four unsigned 4-bit integer components.

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

Syntax

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

Members

4 x

Unsigned 4-bit integer value in the range [0,15] describing the x-coordinate of the vector. The 4-bit x component.

4 y

Unsigned 4-bit integer value in the range [0,15] describing the y-coordinate of the vector. The 4-bit x component.

4 z

Unsigned 4-bit integer value in the range [0,15] describing the z-coordinate of the vector. The 4-bit x component.

4 w

Unsigned 4-bit integer value in the range [0,15] describing the w-coordinate of the vector. The 4-bit x component.

v

Unsigned short representing the 4D vector in a packed format.

void XMUNIBBLE4()

Default constructor for XMUNIBBLE4

Default constructor for XMUNIBBLE4

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

void XMUNIBBLE4( const XMUNIBBLE4 & unnamedParam1)

A constructor for XMUNIBBLE4.

A constructor for XMUNIBBLE4.

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

XMUNIBBLE4 & operator=( const XMUNIBBLE4 & unnamedParam1)

void XMUNIBBLE4( XMUNIBBLE4 && unnamedParam1)

A constructor for XMUNIBBLE4.

A constructor for XMUNIBBLE4.

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

XMUNIBBLE4 & operator=( XMUNIBBLE4 && unnamedParam1)

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

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

void XMUNIBBLE4( uint16_t Packed) noexcept

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

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

Note  This constructor is only available under C++.
 

void XMUNIBBLE4( uint8_t _x, uint8_t _y, uint8_t _z, uint8_t _w) noexcept

Initializes a new instance of XMUNIBBLE4 from four int8_t arguments.

This constructor initializes a new instance of XMUNIBBLE4 from four int8_t arguments.

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

void XMUNIBBLE4( const uint8_t *pArray) noexcept

Initializes a new instance of XMUNIBBLE4 from a four element int8_t array argument.

This constructor initializes a new instance of XMUNIBBLE4 from a four element int8_t array argument.

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

void XMUNIBBLE4( float _x, float _y, float _z, float _w) noexcept

Initializes a new instance of XMUNIBBLE4 from four float arguments.

This constructor initializes a new instance of XMUNIBBLE4 from four float arguments.

Note  This constructor is only available under C++.
 

void XMUNIBBLE4( const float *pArray) noexcept

Initializes a new instance of XMUNIBBLE4 from a four element float array argument.

This constructor initializes a new instance of XMUNIBBLE4 from a from a four element float array argument.

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

void operator uint16_t() noexcept

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

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

Note  This operator is only available under C++.
 

XMUNIBBLE4 & operator=( uint16_t Packed) noexcept

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

Note  This operator is only available under C++.
 

Remarks

XMUNIBBLE4 can be loaded into instances of XMVECTOR by using XMLoadUNibble4.

Instances of XMVECTOR can be stored into an instance of XMUNIBBLE4 with XMStoreUNibble4.

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

Requirement Value
Header directxpackedvector.h

See also

DirectXMath Library Structures

XMUNIBBLE4 Extensions