Load and Save Options — Aspose.3D FOSS for Java
FbxSaveOptions
Semua operasi impor dan ekspor menerima objek opsi opsional yang diturunkan dari LoadOptions atau SaveOptions. Kirim subclass yang sesuai ke Scene.open() atau Scene.save() untuk mengontrol perilaku khusus format.
FbxSaveOptions: com.aspose.threed
import com.aspose.threed.*;LoadOptions
Kelas dasar untuk semua objek load-option. Memperluas A3DObject.
| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|
fileFormat | FileFormat | getFileFormat() | Format yang dikaitkan dengan konfigurasi ini (hanya-baca) |
SaveOptions
Kelas dasar untuk semua objek save-option. Memperluas A3DObject.
| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|
fileFormat | FileFormat | getFileFormat() | Format yang dikaitkan dengan konfigurasi ini (hanya-baca) |
ObjLoadOptions
Opsi muat untuk file Wavefront OBJ (.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 | Balikkan sistem koordinat saat impor |
enableMaterials | boolean | getEnableMaterials() | setEnableMaterials(boolean) | true | Muat yang menyertai .mtl file material |
scale | double | getScale() | setScale(double) | 1.0 | Skala seragam yang diterapkan pada semua geometri yang diimpor |
normalizeNormal | boolean | getNormalizeNormal() | setNormalizeNormal(boolean) | true | Normalisasi vektor normal yang diimpor ke panjang satu |
ObjSaveOptions
Opsi simpan untuk file Wavefront OBJ.
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 | Terapkan faktor skala unit adegan ke koordinat yang diekspor |
pointCloud | boolean | getPointCloud() | setPointCloud(boolean) | false | Ekspor hanya vertex (tanpa wajah poligon) |
verbose | boolean | getVerbose() | setVerbose(boolean) | false | Sertakan komentar OBJ tambahan dalam output |
serializeW | boolean | getSerializeW() | setSerializeW(boolean) | false | Tuliskan komponen W dari titik kontrol |
enableMaterials | boolean | getEnableMaterials() | setEnableMaterials(boolean) | true | Tuliskan sebuah .mtl file material dan referensikan dari the .obj |
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Balikkan sistem koordinat saat mengekspor |
GltfLoadOptions
Muat opsi untuk file glTF 2.0 dan GLB (.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 | Balikkan sistem koordinat saat mengimpor |
prettyPrint | boolean | getPrettyPrint() | setPrettyPrint(boolean) | false | Format output JSON dengan indentasi untuk keterbacaan |
GltfSaveOptions
Opsi simpan untuk output glTF 2.0 dan GLB.
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 | Atur ke FileContentType.BINARY untuk menghasilkan file GLB yang berdiri sendiri; atur ke FileContentType.ASCII untuk JSON .gltf dengan buffer eksternal |
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Balikkan sistem koordinat saat mengekspor |
prettyPrint | boolean | getPrettyPrint() | setPrettyPrint(boolean) | false | Format output JSON dengan indentasi untuk keterbacaan |
bufferFilePrefix | String | getBufferFilePrefix() | setBufferFilePrefix(String) | null | Awalan untuk nama file buffer eksternal |
saveExtras | String | getSaveExtras() | setSaveExtras(String) | null | Data ekstra khusus untuk disertakan dalam output glTF |
StlLoadOptions
Opsi pemuatan untuk file STL (.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 | Balikkan sistem koordinat saat impor |
recalculateNormal | boolean | getRecalculateNormal() | setRecalculateNormal(boolean) | false | Hitung ulang normal dari geometri saat impor |
contentType | FileContentType | getContentType() | setContentType(FileContentType) | – | Petunjuk untuk deteksi STL biner vs ASCII |
StlSaveOptions
Simpan opsi untuk output STL.
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 | Balikkan sistem koordinat saat ekspor |
axisSystem | AxisSystem | getAxisSystem() | setAxisSystem(AxisSystem) | – | Timpa sistem sumbu target saat ekspor |
contentType | FileContentType | getContentType() | setContentType(FileContentType) | FileContentType.BINARY | Atur ke BINARY atau ASCII untuk mengontrol format output |
FbxLoadOptions
Muat opsi untuk file FBX (.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 | Balikkan sistem koordinat saat impor |
FbxSaveOptions
Catatan: Ekspor FBX adalah tidak tersedia di edisi FOSS Java. FBX hanya didukung untuk impor. The FbxSaveOptions kelas ada dalam API tetapi akan menghasilkan error jika digunakan untuk menyimpan. Gunakan OBJ, STL, glTF, atau GLB untuk ekspor sebagai gantinya.