# Mesh::GetSections ```cpp const Containers::Array& GetSections() const; ``` 获取网格的所有分段信息。 **参数:** 无 **返回:** `const Containers::Array&` - 分段数组的只读引用 **异常:** 无 **线程安全:** ✅ **复杂度:** O(1) **示例:** ```cpp #include "XCEngine/Resources/Mesh.h" using namespace XCEngine::Resources; Mesh mesh; mesh.SetVertexData(...); mesh.SetIndexData(...); mesh.AddSection(...); const auto& sections = mesh.GetSections(); for (size_t i = 0; i < sections.Size(); ++i) { const MeshSection& section = sections[i]; // 处理每个分段 } ``` ## 相关文档 - [类总览](mesh.md) - 返回类总览