Files
XCEngine/docs/api/components/light-component/get-intensity.md
ssdfasd c2354530b9 docs: 新增 light-component 全部方法文档及更新其他模块
- components: 新增 light-component 全部12个方法文档
- resources: 更新 audio-loader, resource-file-system 文档
- rhi: 更新 opengl/fence 文档
2026-03-26 02:02:21 +08:00

691 B

GetIntensity

所属类: LightComponent

头文件: XCEngine/Components/LightComponent.h

描述: 获取光源的强度。

函数签名

float GetIntensity() const;

返回值

类型 描述
float 光源强度,默认值为 1.0

使用示例

#include <XCEngine/Components/LightComponent.h>

using namespace XCEngine::Components;

void PrintLightIntensity(LightComponent* light) {
    float intensity = light->GetIntensity();
    printf("Light intensity: %.2f\n", intensity);
}

相关文档