XMSHORT4 結構 (directxpackedvector.h)

包含16位帶正負號整數元件的4D向量。

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

注意如需對等D3DDECLTYPED3DFORMATDXGI_FORMAT對象的相關信息,請參閱 DirectXMath 連結庫類型等價
 

語法

struct XMSHORT4 {
  union {
    struct {
      int16_t x;
      int16_t y;
      int16_t z;
      int16_t w;
    };
    uint64_t v;
  };
  void       XMSHORT4();
  void       XMSHORT4(
    const XMSHORT4 & unnamedParam1
  );
  XMSHORT4 & operator=(
    const XMSHORT4 & unnamedParam1
  );
  void       XMSHORT4(
    XMSHORT4 && unnamedParam1
  );
  XMSHORT4 & operator=(
    XMSHORT4 && unnamedParam1
  );
  void       XMSHORT4(
    uint64_t Packed
  ) noexcept;
  void       XMSHORT4(
    int16_t _x,
    int16_t _y,
    int16_t _z,
    int16_t _w
  ) noexcept;
  void       XMSHORT4(
    const int16_t *pArray
  ) noexcept;
  void       XMSHORT4(
    float _x,
    float _y,
    float _z,
    float _w
  ) noexcept;
  void       XMSHORT4(
    const float *pArray
  ) noexcept;
  XMSHORT4 & operator=(
    uint64_t Packed
  ) noexcept;
};

成員

x

範圍 [-32767, 32767] 中帶正負號的 16 位整數,描述向量的 X 座標。

y

範圍 [-32767, 32767] 中帶正負號的 16 位整數,描述向量的 Y 座標。

z

範圍 [-32767, 32767] 中帶正負號的 16 位整數,描述向量的 z 座標。

w

範圍 [-32767, 32767] 中帶正負號的 16 位整數,描述向量的 w 座標。

v

void XMSHORT4 ()

的預設建構函式 XMSHORT4

XMSHORT4的預設建構函式。

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

void XMSHORT4 ( const XMSHORT4 & unnamedParam1)

的建構函式 XMSHORT4

XMSHORT4的建構函式。

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

XMSHORT4 & operator= ( const XMSHORT4 & unnamedParam1)

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

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

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

void XMSHORT4 ( XMSHORT4 && unnamedParam1)

的建構函式 XMSHORT4

XMSHORT4的建構函式。

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

XMSHORT4 & operator=( XMSHORT4 && unnamedParam1)

void XMSHORT4 ( uint64_t packed) noexcept

的建構函式 XMSHORT4

XMSHORT4的建構函式。

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

void XMSHORT4 ( int16_t _x、int16_t _y、int16_t _z、int16_t _w) noexcept

從四int16_t個自變數初始化 的新實例XMSHORT4

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

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

void XMSHORT4 ( const int16_t *pArray) noexcept

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

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

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

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

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

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

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

void XMSHORT4 ( const float *pArray) noexcept

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

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

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

XMSHORT4 & operator=( uint64_t Packed) noexcept

備註

XMSHORT4可以使用 XMLoadShort4 載入 XMVECTOR 的實例。

XMVECTOR實例可以使用 XMStoreShort4 儲存到 的XMSHORT4實例中。

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

平臺需求

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

規格需求

   
標頭 directxpackedvector.h

另請參閱

DirectXMath 連結庫結構

XMSHORT4擴充功能