Files
XCEngine/docs/api/resources/mesh-loader/methods/get-supported-extensions.md

47 lines
995 B
Markdown

# MeshLoader::GetSupportedExtensions
## 方法签名
```cpp
Containers::Array<Containers::String> GetSupportedExtensions() const override;
```
## 详细描述
返回该加载器支持的文件扩展名列表。`MeshLoader` 支持六种主流 3D 模型文件格式:
- `.fbx` - Autodesk FBX 格式
- `.obj` - Wavefront OBJ 格式
- `.gltf` - GL Transmission Format
- `.glb` - GL Binary 格式
- `.dae` - COLLADA 格式
- `.stl` - STereoLithography 格式
## 参数
## 返回值
`Containers::Array<Containers::String>` - 支持的扩展名数组
## 示例
```cpp
#include "Resources/MeshLoader.h"
using namespace XCEngine::Resources;
MeshLoader loader;
auto extensions = loader.GetSupportedExtensions();
for (const auto& ext : extensions) {
printf("Supported extension: %s\n", ext.CStr());
}
// Output:
// Supported extension: fbx
// Supported extension: obj
// Supported extension: gltf
// Supported extension: glb
// Supported extension: dae
// Supported extension: stl
```