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.


ObjLoadOptions

Laadopties voor Wavefront OBJ‑bestanden (.obj).

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.



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).

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.

```java
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).

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.



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).

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.

---

## Zie ook

- [FileFormat‑klassenreferentie](/3d/java/file-format/)
- [Scene‑klassenreferentie](/3d/java/scene/)
 Nederlands