Load and Save Options

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.

FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
fileFormatFileFormatgetFileFormat()Het formaat waaraan deze configuratie is gekoppeld (alleen‑lezen)

SaveOptions

Basisklasse voor alle save‑optie‑objecten. Breidt uit A3DObject.

FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
fileFormatFileFormatgetFileFormat()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);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseKeer het coördinatensysteem om bij import
enableMaterialsbooleangetEnableMaterials()setEnableMaterials(boolean)trueLaad het bijbehorende .mtl materialbestand
scaledoublegetScale()setScale(double)1.0Uniforme schaal toegepast op alle geïmporteerde geometrie
normalizeNormalbooleangetNormalizeNormal()setNormalizeNormal(boolean)trueNormaliseer 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);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
applyUnitScalebooleangetApplyUnitScale()setApplyUnitScale(boolean)falsePas de eenheidsschaalfactor van de scène toe op geëxporteerde coördinaten
pointCloudbooleangetPointCloud()setPointCloud(boolean)falseExporteer alleen vertices (geen polygonvlakken)
verbosebooleangetVerbose()setVerbose(boolean)falseVoeg extra OBJ-commentaren toe aan de output
serializeWbooleangetSerializeW()setSerializeW(boolean)falseSchrijf de W-component van controlepunten
enableMaterialsbooleangetEnableMaterials()setEnableMaterials(boolean)trueSchrijf een .mtl materialbestand en verwijs ernaar vanuit de .obj
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseKeer 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);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseKeer het coördinatensysteem om bij import
prettyPrintbooleangetPrettyPrint()setPrettyPrint(boolean)falseFormatteer 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);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
contentTypeFileContentTypegetContentType()setContentType(FileContentType)FileContentType.ASCIIInstellen op FileContentType.BINARY om een zelfstandige GLB-bestand te produceren; stel in op FileContentType.ASCII voor JSON .gltf met een externe buffer
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseKeer het coördinatensysteem om bij export
prettyPrintbooleangetPrettyPrint()setPrettyPrint(boolean)falseFormatteer de output‑JSON met inspringing voor leesbaarheid
bufferFilePrefixStringgetBufferFilePrefix()setBufferFilePrefix(String)nullVoorvoegsel voor externe bufferbestandsnamen
saveExtrasStringgetSaveExtras()setSaveExtras(String)nullAangepaste 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);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseKeer het coördinatensysteem om bij import
recalculateNormalbooleangetRecalculateNormal()setRecalculateNormal(boolean)falseHerbereken normals vanuit de geometrie bij import
contentTypeFileContentTypegetContentType()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);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseKeer het coördinatensysteem om bij export
axisSystemAxisSystemgetAxisSystem()setAxisSystem(AxisSystem)Overschrijf het doel‑as‑systeem bij export
contentTypeFileContentTypegetContentType()setContentType(FileContentType)FileContentType.BINARYInstellen 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);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseKeer 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.


Zie ook

 Nederlands