# 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 indices; // ... 填充索引数据 ... mesh->SetIndexData(indices.Data(), indices.Size() * sizeof(uint32_t), indices.Size(), true); ``` ## 相关文档 - [Mesh 总览](mesh.md) - 返回类总览