- resources: 更新 asyncloader, audioclip, mesh-import-settings, texture-loader 文档 - rhi: 更新 opengl render-target-view 文档 - components: 新增 camera-component 全部方法文档 (15个文件)
855 B
855 B
GetNearClipPlane
所属类: CameraComponent
头文件: XCEngine/Components/CameraComponent.h
描述: 获取摄像机的近裁剪平面距离。
函数签名
float GetNearClipPlane() const;
返回值
| 类型 | 描述 |
|---|---|
float |
近裁剪平面距离,默认值为 0.1 |
使用示例
#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 - 摄像机组件
- SetNearClipPlane - 设置近裁剪平面
- GetFarClipPlane - 获取远裁剪平面