Load and Save Options — Aspose.3D FOSS for Java
FbxSaveOptions
Alle Import- und Exportvorgänge akzeptieren ein optionales options object, das abgeleitet ist von LoadOptions oder SaveOptions. Übergeben Sie die passende Unterklasse an Scene.open() oder Scene.save() um formatabhängiges Verhalten zu steuern.
FbxSaveOptions: com.aspose.threed
import com.aspose.threed.*;LoadOptions
Basisklasse für alle load-option Objekte. Erweitert A3DObject.
| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|
fileFormat | FileFormat | getFileFormat() | Das Format, dem diese Konfiguration zugeordnet ist (schreibgeschützt) |
SaveOptions
Basisklasse für alle save-option Objekte. Erweitert A3DObject.
| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|
fileFormat | FileFormat | getFileFormat() | Das Format, dem diese Konfiguration zugeordnet ist (schreibgeschützt) |
ObjLoadOptions
Ladeoptionen für Wavefront OBJ-Dateien (.obj).
import com.aspose.threed.*;
ObjLoadOptions opts = new ObjLoadOptions();
opts.setFlipCoordinateSystem(true);
opts.setScale(0.01);
Scene scene = new Scene();
scene.open("model.obj", opts);| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|---|---|
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Koordinatensystem beim Import umkehren |
enableMaterials | boolean | getEnableMaterials() | setEnableMaterials(boolean) | true | Lade die begleitende .mtl Materialdatei |
scale | double | getScale() | setScale(double) | 1.0 | Einheitliche Skalierung auf alle importierte Geometrie angewendet |
normalizeNormal | boolean | getNormalizeNormal() | setNormalizeNormal(boolean) | true | Normalisiere importierte Normalenvektoren auf die Einheitslänge |
ObjSaveOptions
Speicheroptionen für Wavefront-OBJ-Dateien.
import com.aspose.threed.*;
ObjSaveOptions opts = new ObjSaveOptions();
opts.setEnableMaterials(false);
scene.save("output.obj", opts);| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|---|---|
applyUnitScale | boolean | getApplyUnitScale() | setApplyUnitScale(boolean) | false | Wende den Skalierungsfaktor der Szene auf exportierte Koordinaten an |
pointCloud | boolean | getPointCloud() | setPointCloud(boolean) | false | Exportiere nur Scheitelpunkte (keine Polygonflächen) |
verbose | boolean | getVerbose() | setVerbose(boolean) | false | Füge zusätzliche OBJ-Kommentare in die Ausgabe ein |
serializeW | boolean | getSerializeW() | setSerializeW(boolean) | false | Schreibe die W-Komponente der Kontrollpunkte |
enableMaterials | boolean | getEnableMaterials() | setEnableMaterials(boolean) | true | Schreibe ein .mtl Materialdatei und referenziere sie von der .obj |
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Kippe das Koordinatensystem beim Export |
GltfLoadOptions
Ladeoptionen für glTF 2.0 und GLB-Dateien (.gltf, .glb).
import com.aspose.threed.*;
GltfLoadOptions opts = new GltfLoadOptions();
opts.setFlipCoordinateSystem(true);
Scene scene = new Scene();
scene.open("model.gltf", opts);| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|---|---|
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Koordinatensystem beim Import umkehren |
prettyPrint | boolean | getPrettyPrint() | setPrettyPrint(boolean) | false | Ausgabe‑JSON mit Einrückungen formatieren, um die Lesbarkeit zu erhöhen |
GltfSaveOptions
Speicheroptionen für glTF 2.0 und GLB‑Ausgabe.
import com.aspose.threed.*;
import com.aspose.threed.FileContentType;
// Save as glTF JSON
GltfSaveOptions opts = new GltfSaveOptions();
scene.save("output.gltf", opts);
// Save as GLB (binary glTF)
GltfSaveOptions glbOpts = new GltfSaveOptions();
glbOpts.setContentType(FileContentType.BINARY);
scene.save("output.glb", glbOpts);| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|---|---|
contentType | FileContentType | getContentType() | setContentType(FileContentType) | FileContentType.ASCII | Setzen auf FileContentType.BINARY um eine eigenständige GLB-Datei zu erzeugen; setzen Sie auf FileContentType.ASCII für JSON .gltf mit einem externen Puffer |
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Koordinatensystem beim Export umkehren |
prettyPrint | boolean | getPrettyPrint() | setPrettyPrint(boolean) | false | Formatieren Sie das Ausgabe‑JSON mit Einrückungen zur besseren Lesbarkeit |
bufferFilePrefix | String | getBufferFilePrefix() | setBufferFilePrefix(String) | null | Präfix für externe Pufferdateinamen |
saveExtras | String | getSaveExtras() | setSaveExtras(String) | null | Benutzerdefinierte Extras‑Daten, die in die glTF‑Ausgabe aufgenommen werden sollen |
StlLoadOptions
Ladeoptionen für STL-Dateien (.stl).
import com.aspose.threed.*;
StlLoadOptions opts = new StlLoadOptions();
opts.setFlipCoordinateSystem(true);
Scene scene = new Scene();
scene.open("part.stl", opts);| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|---|---|
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Koordinatensystem beim Import umkehren |
recalculateNormal | boolean | getRecalculateNormal() | setRecalculateNormal(boolean) | false | Normalen beim Import aus Geometrie neu berechnen |
contentType | FileContentType | getContentType() | setContentType(FileContentType) | – | Hinweis zur Erkennung von binärem vs. ASCII STL |
StlSaveOptions
Speicheroptionen für STL‑Ausgabe.
import com.aspose.threed.*;
StlSaveOptions opts = new StlSaveOptions();
opts.setContentType(FileContentType.BINARY);
scene.save("output.stl", opts);| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|---|---|
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Koordinatensystem beim Export umkehren |
axisSystem | AxisSystem | getAxisSystem() | setAxisSystem(AxisSystem) | – | Ziel-Achsensystem beim Export überschreiben |
contentType | FileContentType | getContentType() | setContentType(FileContentType) | FileContentType.BINARY | Setzen auf BINARY oder ASCII zur Steuerung des Ausgabeformats |
FbxLoadOptions
Ladeoptionen für FBX-Dateien (.fbx).
import com.aspose.threed.*;
FbxLoadOptions opts = new FbxLoadOptions();
opts.setFlipCoordinateSystem(true);
Scene scene = new Scene();
scene.open("animation.fbx", opts);| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|---|---|
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Koordinatensystem beim Import umkehren |
FbxSaveOptions
Hinweis: FBX-Export ist nicht verfügbar in der Java FOSS-Edition. FBX wird nur für den Import unterstützt. Die FbxSaveOptions Klasse existiert in der API, führt jedoch zu einem Fehler, wenn sie zum Speichern verwendet wird. Verwenden Sie stattdessen OBJ, STL, glTF oder GLB für den Export.