docs: update resources API docs
This commit is contained in:
26
docs/api/resources/material/set-float3.md
Normal file
26
docs/api/resources/material/set-float3.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Material::SetFloat3
|
||||
|
||||
```cpp
|
||||
void SetFloat3(const Containers::String& name, const Math::Vector3& value);
|
||||
```
|
||||
|
||||
设置三维向量属性值,常用于颜色、法线缩放等。
|
||||
|
||||
**参数:**
|
||||
- `name` - 属性名称
|
||||
- `value` - 三维向量值
|
||||
|
||||
**线程安全:** ❌
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
mat->SetFloat3("albedo", Math::Vector3(1.0f, 0.8f, 0.6f));
|
||||
mat->SetFloat3("emission", Math::Vector3(0.5f, 0.5f, 0.5f));
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Material](material.md) - 返回类总览
|
||||
Reference in New Issue
Block a user