Load and Save Options — Aspose.3D FOSS for Java
FbxSaveOptions
Alle import- en exportbewerkingen accepteren een optioneel opties-object afgeleid van LoadOptions of SaveOptions. Geef de juiste subklasse door aan Scene.open() of Scene.save() om format‑specifiek gedrag te regelen.
FbxSaveOptions: com.aspose.threed
import com.aspose.threed.*;LoadOptions
Basisklasse voor alle load‑optie‑objecten. Breidt uit A3DObject.
| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|
fileFormat | FileFormat | getFileFormat() | Het formaat waaraan deze configuratie is gekoppeld (alleen‑lezen) |
SaveOptions
Basisklasse voor alle save‑optie‑objecten. Breidt uit A3DObject.
| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|
fileFormat | FileFormat | getFileFormat() | Het formaat waaraan deze configuratie is gekoppeld (alleen‑lezen) |
ObjLoadOptions
Laadopties voor Wavefront OBJ‑bestanden (.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 | Keer het coördinatensysteem om bij import |
enableMaterials | boolean | getEnableMaterials() | setEnableMaterials(boolean) | true | Laad het bijbehorende .mtl materialbestand |
scale | double | getScale() | setScale(double) | 1.0 | Uniforme schaal toegepast op alle geïmporteerde geometrie |
normalizeNormal | boolean | getNormalizeNormal() | setNormalizeNormal(boolean) | true | Normaliseer geïmporteerde normaalvectoren tot een eenheidslengte |
ObjSaveOptions
Save‑opties voor Wavefront OBJ‑bestanden.
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 | Pas de eenheidsschaalfactor van de scène toe op geëxporteerde coördinaten |
pointCloud | boolean | getPointCloud() | setPointCloud(boolean) | false | Exporteer alleen vertices (geen polygonvlakken) |
verbose | boolean | getVerbose() | setVerbose(boolean) | false | Voeg extra OBJ-commentaren toe aan de output |
serializeW | boolean | getSerializeW() | setSerializeW(boolean) | false | Schrijf de W-component van controlepunten |
enableMaterials | boolean | getEnableMaterials() | setEnableMaterials(boolean) | true | Schrijf een .mtl materialbestand en verwijs ernaar vanuit de .obj |
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Keer het coördinatensysteem om bij export |
GltfLoadOptions
Laadopties voor glTF 2.0- en GLB-bestanden (.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 | Keer het coördinatensysteem om bij import |
prettyPrint | boolean | getPrettyPrint() | setPrettyPrint(boolean) | false | Formatteer de JSON-uitvoer met inspringing voor leesbaarheid |
GltfSaveOptions
Save‑opties voor glTF 2.0‑ en 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 | Instellen op FileContentType.BINARY om een zelfstandige GLB-bestand te produceren; stel in op FileContentType.ASCII voor JSON .gltf met een externe buffer |
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Keer het coördinatensysteem om bij export |
prettyPrint | boolean | getPrettyPrint() | setPrettyPrint(boolean) | false | Formatteer de output‑JSON met inspringing voor leesbaarheid |
bufferFilePrefix | String | getBufferFilePrefix() | setBufferFilePrefix(String) | null | Voorvoegsel voor externe bufferbestandsnamen |
saveExtras | String | getSaveExtras() | setSaveExtras(String) | null | Aangepaste extra gegevens om op te nemen in de glTF‑output |
StlLoadOptions
Laadopties voor STL‑bestanden (.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 | Keer het coördinatensysteem om bij import |
recalculateNormal | boolean | getRecalculateNormal() | setRecalculateNormal(boolean) | false | Herbereken normals vanuit de geometrie bij import |
contentType | FileContentType | getContentType() | setContentType(FileContentType) | – | Hint voor binaire versus ASCII STL-detectie |
StlSaveOptions
Opslagopties voor 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 | Keer het coördinatensysteem om bij export |
axisSystem | AxisSystem | getAxisSystem() | setAxisSystem(AxisSystem) | – | Overschrijf het doel‑as‑systeem bij export |
contentType | FileContentType | getContentType() | setContentType(FileContentType) | FileContentType.BINARY | Instellen op BINARY of ASCII om het uitvoerformaat te regelen |
FbxLoadOptions
Laadopties voor FBX-bestanden (.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 | Keer het coördinatensysteem om bij import |
FbxSaveOptions
Opmerking: FBX-export is niet beschikbaar in de Java FOSS-editie. FBX wordt alleen voor import ondersteund. De FbxSaveOptions klasse bestaat in de API maar zal een fout veroorzaken als deze wordt gebruikt om op te slaan. Gebruik in plaats daarvan OBJ, STL, glTF of GLB voor export.