Share via


XMUNIBBLE4 結構 (directxpackedvector.h)

具有四個不帶正負號 4 位整數位元件的 4D 向量。

如需在 C++ 中程式設計時可使用的其他功能清單,例如建 XMUNIBBLE4 構函式和運算符,請參閱 XMUNIBBLE4 Extensions

語法

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;
};

成員

4 x

描述向量 X 座標的範圍 [0,15] 中的不帶正負號 4 位整數值。 4 位 x 元件。

4 y

描述向量 Y 座標的範圍 [0,15] 中的不帶正負號 4 位整數值。 4 位 x 元件。

4 z

描述向量 z 座標的範圍 [0,15] 中不帶正負號的 4 位整數值。 4 位 x 元件。

4 w

描述向量 w 座標的範圍 [0,15] 中的不帶正負號 4 位整數值。 4 位 x 元件。

v

不帶正負號的 short,代表以封裝格式表示 4D 向量。

void XMUNIBBLE4 ()

的預設建構函式 XMUNIBBLE4

XMUNIBBLE4的預設建構函式

注意 這僅適用於以 C++ 為基礎的開發。
 

void XMUNIBBLE4 ( const XMUNIBBLE4 & unnamedParam1)

的建構函式 XMUNIBBLE4

XMUNIBBLE4的建構函式。

注意 這僅適用於以 C++ 為基礎的開發。

XMUNIBBLE4 & operator=( const XMUNIBBLE4 & unnamedParam1)

void XMUNIBBLE4 ( XMUNIBBLE4 && unnamedParam1)

的建構函式 XMUNIBBLE4

XMUNIBBLE4的建構函式。

注意 這僅適用於以 C++ 為基礎的開發。

XMUNIBBLE4 &运算符= ( XMUNIBBLE4 && unnamedParam1)

將 向量元件數據從的一個實例 XMUNIBBLE4 指派給 目前的 實例 XMUNIBBLE4

這個運算子會將向量元件數據從 XMUNIBBLE4 的一個實例指派給目前的實例 XMUNIBBLE4

void XMUNIBBLE4 ( uint16_t Packed) noexcept

uint16_t以封裝格式包含元件數據的變數,初始化 的新實例XMUNIBBLE

此建構函式會從uint16_t包含封裝格式元件數據的變數初始化 XMUNIBBLE4 的新實例。

注意 此建構函式只能在 C++ 下使用。
 

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

從四int8_t個自變數初始化 XMUNIBBLE4 的新實例。

此建構函式會從四int8_t個自變數初始化 XMUNIBBLE4 的新實例。

注意 這僅適用於以 C++ 為基礎的開發。

void XMUNIBBLE4 ( const uint8_t *pArray) noexcept

從四int8_t個項目數位自變數初始化 XMUNIBBLE4的新實例。

這個建構函式會從四個項目int8_t數位化自變數初始化 XMUNIBBLE4的新實例。

注意 這僅適用於以 C++ 為基礎的開發。

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

從四float個自變數初始化 的新實例XMUNIBBLE4

此建構函式會從四float個自變數初始化 XMUNIBBLE4 的新實例。

注意 此建構函式只能在 C++ 下使用。
 

void XMUNIBBLE4 ( const float *pArray) noexcept

從四float個項目數位自變數初始化 XMUNIBBLE4的新實例。

這個建構函式會從四 float 個項目數位化自變數初始化 XMUNIBBLE4的新實例。

注意 這僅適用於以 C++ 為基礎的開發。

void 運算子 uint16_t () noexcept

傳回的 uint16_t 實例,包含封裝格式之 XMUNIBBLE4 實例的元件。

這個運算符會傳回的 uint16_t 實例,其中包含封裝格式 之 XMUNIBBLE4 實例的元件。

注意 此運算子只能在 C++ 下使用。
 

XMUNIBBLE4 &运算符= ( uint16_t Packed) noexcept

將封裝在 實例 uint16_t 中的向量元件數據指派給 目前的 實例 XMUNIBBLE4

注意 此運算子只能在 C++ 下使用。
 

備註

XMUNIBBLE4可以使用 XMLoadUNibble4 載入 XMVECTOR 的實例。

XMVECTOR實例可以使用 XMStoreUNibble4 儲存到 的XMUNIBBLE4實例中。

命名空間: 使用 DirectX::P ackedVector

平臺需求

Microsoft Visual Studio 2010 或 Microsoft Visual Studio 2012 與 Windows SDK for Windows 8。 支援 Win32 傳統型應用程式、Windows 市集應用程式和 Windows Phone 8 個應用程式。

規格需求

需求
標頭 directxpackedvector.h

另請參閱

DirectXMath 連結庫結構

XMUNIBBLE4延伸模組