Load and Save Options — Aspose.3D FOSS for Java
FbxSaveOptions
Alle import- og eksportoperationer accepterer et valgfrit options-objekt afledt fra LoadOptions eller SaveOptions. Videregiv den passende underklasse til Scene.open() eller Scene.save() for at kontrollere format‑specifik adfærd.
FbxSaveOptions: com.aspose.threed
import com.aspose.threed.*;LoadOptions
Basisklasse for alle load-option-objekter. Udvider A3DObject.
| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|
fileFormat | FileFormat | getFileFormat() | Formatet, som denne konfiguration er knyttet til (kun læsning) |
SaveOptions
Basisklasse for alle save-option-objekter. Udvider A3DObject.
| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|
fileFormat | FileFormat | getFileFormat() | Formatet, som denne konfiguration er knyttet til (skrivebeskyttet) |
ObjLoadOptions
Indlæsningsindstillinger for Wavefront OBJ-filer (.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 | Vend koordinatsystemet ved import |
enableMaterials | boolean | getEnableMaterials() | setEnableMaterials(boolean) | true | Indlæs den tilhørende .mtl materialfil |
scale | double | getScale() | setScale(double) | 1.0 | Ensartet skalering anvendt på al importeret geometri |
normalizeNormal | boolean | getNormalizeNormal() | setNormalizeNormal(boolean) | true | Normaliser importerede normalvektorer til enhedslængde |
ObjSaveOptions
Gem‑indstillinger for Wavefront OBJ‑filer.
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 | Anvend scenens enhedsskalafaktor på eksporterede koordinater |
pointCloud | boolean | getPointCloud() | setPointCloud(boolean) | false | Eksporter kun vertices (ingen polygonflader) |
verbose | boolean | getVerbose() | setVerbose(boolean) | false | Inkluder yderligere OBJ-kommentarer i outputtet |
serializeW | boolean | getSerializeW() | setSerializeW(boolean) | false | Skriv W-komponenten af kontrolpunkterne |
enableMaterials | boolean | getEnableMaterials() | setEnableMaterials(boolean) | true | Skriv en .mtl materialfil og referer til den fra the .obj |
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Vend koordinatsystemet ved eksport |
GltfLoadOptions
Indlæsningsindstillinger for glTF 2.0- og GLB-filer (.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 | Vend koordinatsystemet ved import |
prettyPrint | boolean | getPrettyPrint() | setPrettyPrint(boolean) | false | Formater output-JSON med indrykning for læsbarhed |
GltfSaveOptions
Gem indstillinger for glTF 2.0 og GLB-output.
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 | Indstil til FileContentType.BINARY for at producere en selvstændig GLB-fil; indstil til FileContentType.ASCII for JSON .gltf med en ekstern buffer |
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Vend koordinatsystemet ved eksport |
prettyPrint | boolean | getPrettyPrint() | setPrettyPrint(boolean) | false | Formater output-JSON’en med indrykning for læsbarhed |
bufferFilePrefix | String | getBufferFilePrefix() | setBufferFilePrefix(String) | null | Præfiks for eksterne bufferfilnavne |
saveExtras | String | getSaveExtras() | setSaveExtras(String) | null | Tilpassede ekstra data, der skal inkluderes i glTF-outputtet |
StlLoadOptions
Indlæsningsindstillinger for STL-filer (.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 | Vend koordinatsystemet ved import |
recalculateNormal | boolean | getRecalculateNormal() | setRecalculateNormal(boolean) | false | Genberegn normaler fra geometri ved import |
contentType | FileContentType | getContentType() | setContentType(FileContentType) | – | Hint til binær vs ASCII STL-detektion |
StlSaveOptions
Gem indstillinger for STL-output.
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 | Vend koordinatsystemet ved eksport |
axisSystem | AxisSystem | getAxisSystem() | setAxisSystem(AxisSystem) | – | Tilsidesæt målakse-systemet ved eksport |
contentType | FileContentType | getContentType() | setContentType(FileContentType) | FileContentType.BINARY | Indstil til BINARY eller ASCII for at kontrollere outputformatet |
FbxLoadOptions
Indlæs indstillinger for FBX-filer (.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 | Vend koordinatsystemet ved import |
FbxSaveOptions
Bemærk: FBX-eksport er ikke tilgængelig i Java FOSS-udgaven. FBX understøttes kun til import. Den FbxSaveOptions Klassen findes i API’et, men vil give en fejl, hvis den bruges til at gemme. Brug i stedet OBJ, STL, glTF eller GLB til eksport.