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,41 @@
# Mesh::Release
```cpp
void Release() override;
```
释放网格资源持有的所有数据。将清空顶点数据、索引数据和所有网格分段信息,并将相关计数重置为 0。
**参数:**
**返回:**
**异常:**
**线程安全:**
**复杂度:** O(n) - n 为数据大小
**示例:**
```cpp
#include "XCEngine/Resources/Mesh.h"
using namespace XCEngine::Resources;
Mesh mesh;
mesh.SetVertexData(...);
mesh.SetIndexData(...);
mesh.AddSection(...);
// 使用完毕,释放数据
mesh.Release();
// 释放后所有数据清空
assert(mesh.GetVertexCount() == 0);
assert(mesh.GetIndexCount() == 0);
```
## 相关文档
- [类总览](mesh.md) - 返回类总览