> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ILampInfo::GetIndex

> ILampInfo::GetIndex

# ILampInfo::GetIndex

返回指定 Lamp 在 LampArray 中所处的索引。

## 语法

```cpp theme={null}
uint32_t GetIndex(
)
```

### 参数

此方法没有参数。

### 返回值

类型：uint32\_t

Lamp 在 LampArray 中的索引。

## 备注

有效的 Lamp 索引范围为 0 到 [ILampArray::GetLampCount](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getlampcount) - 1。

## 要求

**头文件：** LampArray.h

**库：** xgameplatform.lib

**支持的平台：** XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[光照 API 概览](/build/core-features/common/lighting/gc-lighting-toc)\
[ILampArray::GetLampInfo](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getlampinfo)\
[ILampInfo](/reference/lighting/lamparray/interfaces/ilampinfo/ilampinfo)


## Related topics

- [ILampInfo::GetPosition](/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getposition.md)
- [ILampInfo::GetPurposes](/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getpurposes.md)
- [ILampInfo::GetNearestSupportedColor](/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getnearestsupportedcolor.md)
- [ILampInfo::GetFixedColor](/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getfixedcolor.md)
- [ILampInfo::GetScanCode](/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getscancode.md)
