FileFormat — Aspose.3D FOSS for .NET

Overview

The FileFormat class acts as a registry of all supported 3D file formats. It provides static constants for each format and utility methods for format detection and option creation.

Format Constants

ConstantFormatExtension
FileFormat.WavefrontOBJWavefront OBJ.obj
FileFormat.STLSTL (binary/ASCII).stl
FileFormat.GLTF2glTF 2.0.gltf
FileFormat.FBX7400ASCIIFBX 7.4 ASCII.fbx
FileFormat.ColladaCollada.dae

Methods

MethodReturn TypeDescription
Detect(string filePath)FileFormatDetects the format from a file path
GetFormatByExtension(string ext)FileFormatReturns the format matching the extension
CreateLoadOptions()LoadOptionsCreates default load options for this format
CreateSaveOptions()SaveOptionsCreates default save options for this format

Example

using Aspose.ThreeD;
using Aspose.ThreeD.Formats;

var scene = new Scene();
scene.Open("model.obj");

var format = FileFormat.Detect("output.gltf");
scene.Save("output.gltf", format.CreateSaveOptions());

See Also