File Format — Aspose.3D FOSS for Java
Übersicht
Die FileFormat class ist eine statische Registrierung aller von Aspose.3D FOSS für Java unterstützten Dateiformate. Instanzen sind vordefinierte Konstanten wie z.B. FileFormat.WAVEFRONTOBJ, FileFormat.GLTF2,oder , FileFormat.FBX7400ASCII.- Pass auf . FileFormat In diesem Fall Scene.save() das Ausgangsformat ausdrücklich zu wählen.
Package: com.aspose.threed
Klassen und Aufzählungen
| Typ der | Beschreibung |
|---|---|
FileFormat | Statische Registrierung der unterstützten Dateiformate. Enthält Konstanten wie WAVEFRONTOBJ, GLTF2, GLTF2_BINARY, FBX7400ASCII, FBX7600_BINARY, STL, STL_BINARY. |
FileFormatType | Breite Kategorie eines Dateiformats: GEOMETRY, POINT_CLOUD, etc. Zugriff über FileFormat.getFormatType(). |
FileContentType | Steuert, ob die Ausgabe als binär oder ASCII geschrieben wird. StlSaveOptions.setContentType() und . GltfSaveOptions.setContentType(). |
Unterstützte Formate
| Formatkonstante | Erweiterung | Last | Speichern |
|---|---|---|---|
FileFormat.WAVEFRONTOBJ | .obj | ✓ | ✓ |
FileFormat.GLTF2 | .gltf | ✓ | ✓ |
FileFormat.GLTF2_BINARY | .glb | ✓ | ✓ |
FileFormat.FBX7400ASCII | .fbx | ✓ | ✓ |
FileFormat.FBX7600_BINARY | .fbx | ✓ | ✓ |
FileFormat.STL | .stl | ✓ | ✓ |
FileFormat.STL_BINARY | .stl | ✓ | ✓ |
Schnelles Beispiel
import com.aspose.threed.Scene;
import com.aspose.threed.FileFormat;
Scene scene = Scene.fromFile("model.obj");
// Save as binary FBX explicitly
scene.save("output.fbx", FileFormat.FBX7600_BINARY);
// Or save using the file extension for auto-detection
scene.save("output.gltf");