721 B
721 B
GetCastsShadows
所属类: LightComponent
头文件: XCEngine/Components/LightComponent.h
描述: 检查光源是否投射阴影。
函数签名
bool GetCastsShadows() const;
返回值
| 类型 | 描述 |
|---|---|
bool |
true 表示投射阴影,false 表示不投射阴影 |
使用示例
#include <XCEngine/Components/LightComponent.h>
using namespace XCEngine::Components;
void CheckShadowCasting(LightComponent* light) {
if (light->GetCastsShadows()) {
printf("This light casts shadows\n");
}
}
相关文档
- LightComponent - 光源组件
- SetCastsShadows - 设置阴影投射