> ## 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::GetPosition

> ILampInfo::GetPosition

# ILampInfo::GetPosition

返回 Lamp 相对于 LampArray 边界框原点的 3D 位置。

## 语法

```cpp theme={null}
LampArrayPosition GetPosition(
)
```

### 参数

此方法没有参数。

### 返回值

类型：[LampArrayPosition](/reference/lighting/lamparray/structs/lamparrayposition)

Lamp 的位置。

## 备注

边界框的原点（零点）是该框最上方、最远、最左侧的角。

X 对应宽度，从左到右递增。\
Y 对应高度，从最远到最近递增。\
Z 对应深度，从上到下递增。

位置数值以米为单位。

以下是键盘上品牌 Lamp 位置的示例：

<img src="https://mintcdn.com/microsoft-4404708b/gzrdvT5kpqAXKEQt/images/gdk/reference/lampinfoposition.png?fit=max&auto=format&n=gzrdvT5kpqAXKEQt&q=85&s=96636e1a82b7fe5ef0e091cfa3993147" alt="Keyboard lamp position" width="802" height="698" data-path="images/gdk/reference/lampinfoposition.png" />

## 要求

**头文件：** LampArray.h

**库：** xgameplatform.lib

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

## 另请参阅

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


## Related topics

- [LampArrayPosition](/zh-CN/reference/lighting/lamparray/structs/lamparrayposition.md)
- [LampArray 效果](/zh-CN/build/core-features/common/lighting/lighting-effects.md)
- [ILampArray::GetBoundingBox](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getboundingbox.md)
- [ILampInfo::GetIndex](/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getindex.md)
- [ILampInfo::GetPurposes](/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getpurposes.md)
