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

# GetIndex

> ILampInfo::GetIndex

# ILampInfo::GetIndex

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

## 语法

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

### 参数

此方法没有参数。

### 返回值

类型：uint32\_t

Lamp 在 LampArray 中的索引。

## 备注

有效的 Lamp 索引范围为 0 到 [ILampArray::GetLampCount](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getlampcount.md) - 1。

## 要求

**头文件：** LampArray.h

**库：** xgameplatform.lib

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

## 另请参阅

[光照 API 概览](https://docs.xbox.com/zh-CN/build/core-features/common/lighting/gc-lighting-toc.md)\
[ILampArray::GetLampInfo](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getlampinfo.md)\
[ILampInfo](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/ilampinfo.md)


## Related topics

- [ILampInfo（接口内容）](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/ilampinfo.md)
- [GetMotorIndex](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getmotorindex.md)
- [HCWebSocketGetHeaderAtIndex](https://docs.xbox.com/zh-CN/reference/live/httpclient/httpprovider/functions/hcwebsocketgetheaderatindex.md)
- [XblHttpCallGetHeaderAtIndex](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/http_call_c/functions/xblhttpcallgetheaderatindex.md)
- [HCHttpCallRequestGetHeaderAtIndex](https://docs.xbox.com/zh-CN/reference/live/httpclient/httpprovider/functions/hchttpcallrequestgetheaderatindex.md)
