共用方式為


XMLoadShort4 函式 (directxpackedvector.h)

XMSHORT4 載入 XMVECTOR

語法

XMVECTOR XM_CALLCONV XMLoadShort4(
  [in] const XMSHORT4 *pSource
) noexcept;

參數

[in] pSource

要載入之 XMSHORT4 結構的位址。

傳回值

傳回從pSource參數載入資料的XMVECTOR結構。

備註

XMSHORT4的四個成員會轉換成單精確度格式,並載入至 XMVECTOR的對應成員。 下列虛擬程式碼示範此函式的作業:

XMVECTOR Result;

Result.x = (float)pSource->x;
Result.y = (float)pSource->y;
Result.z = (float)pSource->z;
Result.w = (float)pSource->w;

return Result;

平臺需求

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

需求

   
目標平台 Windows
標頭 directxpackedvector.h (包含 DirectXPackedVector.h)

另請參閱

DirectXMath 程式庫向量載入函式