Files
XCSDD/docs/api/resources/mesh/setindexdata.md
ssdfasd 58a83f445a fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling
- Improve link styling with underline decoration
- Hide leaf nodes from tree, only show directories
- Fix log file path for packaged app
2026-03-19 12:44:08 +08:00

31 lines
690 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Mesh::SetIndexData
```cpp
void SetIndexData(const void* data, size_t size, Core::uint32 indexCount, bool use32Bit)
```
设置网格索引数据。复制索引缓冲数据到内部存储。
**参数:**
- `data` - 索引数据指针
- `size` - 数据大小(字节)
- `indexCount` - 索引数量
- `use32Bit` - 是否使用 32 位索引(否则使用 16 位)
**返回:**
**复杂度:** O(n)n 为索引数据大小
**示例:**
```cpp
Containers::Array<uint32_t> indices;
// ... 填充索引数据 ...
mesh->SetIndexData(indices.Data(), indices.Size() * sizeof(uint32_t),
indices.Size(), true);
```
## 相关文档
- [Mesh 总览](mesh.md) - 返回类总览