XMVectorGetIntByIndex 函数 (directxmath.h)

按索引检索包含整数数据的 XMVECTOR 数据类型 的四个组件之一的值。

语法

uint32_t XM_CALLCONV XMVectorGetIntByIndex(
  FXMVECTOR V,
  size_t    i
) noexcept;

参数

V

包含整数 数据的 XMVECTOR 数据类型

i

要检索的组件的索引。

返回值

所选组件的整数值。

备注

i 的值必须为正值,并且必须小于或等于 3 ( 0 <= i <= 3 ) 。

索引与 XMVECTOR 数据类型 向量组件具有以下对应关系:

索引 组件
0 x
1 y
2 z
3 w
 

平台要求

带有 Windows SDK for Windows 8 的 Microsoft Visual Studio 2010 或 Microsoft Visual Studio 2012。 支持 Win32 桌面应用、Windows 应用商店应用和 Windows Phone 8 应用。

要求

   
目标平台 Windows
标头 directxmath.h (包括 DirectXMath.h)

另请参阅

DirectXMath 库向量访问器函数

XMVectorGetIntByIndexPtr

XMVectorSetIntByIndex