docs: update resources API docs

This commit is contained in:
2026-03-20 02:35:35 +08:00
parent fd792b7df1
commit ea756c0177
314 changed files with 9439 additions and 1360 deletions

View File

@@ -0,0 +1,37 @@
# VertexAttribute
**命名空间**: `XCEngine::Resources`
**类型**: `enum class`
**描述**: 顶点属性标志枚举,用于指定网格顶点包含哪些属性。
## 概述
VertexAttribute 是位标志枚举,用于描述顶点缓冲中包含的顶点属性类型。每种属性对应一个比特位,可以组合使用。
## 枚举值
| 值 | 描述 |
|----|------|
| `Position` | 顶点位置 (x, y, z) |
| `Normal` | 法线向量 (x, y, z) |
| `Tangent` | 切线向量 (x, y, z) |
| `Color` | 顶点颜色 (r, g, b, a) |
| `UV0` | 第一组 UV 坐标 |
| `UV1` | 第二组 UV 坐标 |
| `UV2` | 第三组 UV 坐标 |
| `UV3` | 第四组 UV 坐标 |
| `BoneWeights` | 骨骼权重 |
| `BoneIndices` | 骨骼索引 |
## 使用示例
```cpp
VertexAttribute attributes = VertexAttribute::Position | VertexAttribute::Normal | VertexAttribute::UV0;
```
## 相关文档
- [Mesh 类总览](mesh.md) - 返回类总览
- [SetVertexData](./setvertexdata.md) - 设置顶点数据