- resources: 更新 asyncloader, audioclip, mesh-import-settings, texture-loader 文档 - rhi: 更新 opengl render-target-view 文档 - components: 新增 camera-component 全部方法文档 (15个文件)
40 lines
855 B
Markdown
40 lines
855 B
Markdown
# GetNearClipPlane
|
|
|
|
**所属类**: `CameraComponent`
|
|
|
|
**头文件**: `XCEngine/Components/CameraComponent.h`
|
|
|
|
**描述**: 获取摄像机的近裁剪平面距离。
|
|
|
|
## 函数签名
|
|
|
|
```cpp
|
|
float GetNearClipPlane() const;
|
|
```
|
|
|
|
## 返回值
|
|
|
|
| 类型 | 描述 |
|
|
|------|------|
|
|
| `float` | 近裁剪平面距离,默认值为 0.1 |
|
|
|
|
## 使用示例
|
|
|
|
```cpp
|
|
#include <XCEngine/Components/CameraComponent.h>
|
|
|
|
using namespace XCEngine::Components;
|
|
|
|
void PrintClipPlanes(CameraComponent* camera) {
|
|
float near = camera->GetNearClipPlane();
|
|
float far = camera->GetFarClipPlane();
|
|
printf("Clip planes: %.2f to %.2f\n", near, far);
|
|
}
|
|
```
|
|
|
|
## 相关文档
|
|
|
|
- [CameraComponent](camera-component.md) - 摄像机组件
|
|
- [SetNearClipPlane](set-near-clip-plane.md) - 设置近裁剪平面
|
|
- [GetFarClipPlane](get-far-clip-plane.md) - 获取远裁剪平面
|