docs: 新增 light-component 全部方法文档及更新其他模块
- components: 新增 light-component 全部12个方法文档 - resources: 更新 audio-loader, resource-file-system 文档 - rhi: 更新 opengl/fence 文档
This commit is contained in:
38
docs/api/components/light-component/get-casts-shadows.md
Normal file
38
docs/api/components/light-component/get-casts-shadows.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# GetCastsShadows
|
||||
|
||||
**所属类**: `LightComponent`
|
||||
|
||||
**头文件**: `XCEngine/Components/LightComponent.h`
|
||||
|
||||
**描述**: 检查光源是否投射阴影。
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
bool GetCastsShadows() const;
|
||||
```
|
||||
|
||||
## 返回值
|
||||
|
||||
| 类型 | 描述 |
|
||||
|------|------|
|
||||
| `bool` | true 表示投射阴影,false 表示不投射阴影 |
|
||||
|
||||
## 使用示例
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/LightComponent.h>
|
||||
|
||||
using namespace XCEngine::Components;
|
||||
|
||||
void CheckShadowCasting(LightComponent* light) {
|
||||
if (light->GetCastsShadows()) {
|
||||
printf("This light casts shadows\n");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [LightComponent](./light-component.md) - 光源组件
|
||||
- [SetCastsShadows](./set-casts-shadows.md) - 设置阴影投射
|
||||
Reference in New Issue
Block a user