Load and Save Options — Aspose.3D FOSS for Java
FbxSaveOptions
Semua operasi import dan eksport menerima objek pilihan opsional yang diturunkan daripada LoadOptions atau SaveOptions. Hantar subkelas yang sesuai kepada Scene.open() atau Scene.save() untuk mengawal kelakuan khusus format.
FbxSaveOptions: com.aspose.threed
import com.aspose.threed.*;LoadOptions
Kelas asas untuk semua objek pilihan-muat. Extends A3DObject.
| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|
fileFormat | FileFormat | getFileFormat() | Format yang dikaitkan dengan konfigurasi ini (baca-sahaja) |
SaveOptions
Kelas asas untuk semua objek pilihan-simpan. Extends A3DObject.
| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|
fileFormat | FileFormat | getFileFormat() | Format yang dikaitkan dengan konfigurasi ini (baca-sahaja) |
ObjLoadOptions
Pilihan muat untuk fail 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 semasa import |
enableMaterials | boolean | getEnableMaterials() | setEnableMaterials(boolean) | true | Muatkan yang mengiringi .mtl fail bahan |
scale | double | getScale() | setScale(double) | 1.0 | Skala seragam yang diterapkan pada semua geometri yang diimport |
normalizeNormal | boolean | getNormalizeNormal() | setNormalizeNormal(boolean) | true | Normalisasikan vektor normal yang diimport kepada panjang unit |
ObjSaveOptions
Pilihan simpan untuk fail 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 kepada koordinat yang dieksport |
pointCloud | boolean | getPointCloud() | setPointCloud(boolean) | false | Eksport hanya verteks (tiada muka poligon) |
verbose | boolean | getVerbose() | setVerbose(boolean) | false | Sertakan komen OBJ tambahan dalam output |
serializeW | boolean | getSerializeW() | setSerializeW(boolean) | false | Tulis komponen W bagi titik kawalan |
enableMaterials | boolean | getEnableMaterials() | setEnableMaterials(boolean) | true | Tulis satu .mtl fail bahan dan rujuk daripadanya .obj |
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Balikkan sistem koordinat semasa eksport |
GltfLoadOptions
Pilihan muat untuk fail 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 semasa import |
prettyPrint | boolean | getPrettyPrint() | setPrettyPrint(boolean) | false | Formatkan JSON output dengan penjarakan untuk kebolehbacaan |
GltfSaveOptions
Pilihan 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 | Tetapkan kepada FileContentType.BINARY untuk menghasilkan fail GLB yang berdiri sendiri; tetapkan kepada FileContentType.ASCII untuk JSON .gltf dengan buffer luaran |
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Balikkan sistem koordinat semasa eksport |
prettyPrint | boolean | getPrettyPrint() | setPrettyPrint(boolean) | false | Formatkan output JSON dengan penjarakan untuk kebolehbacaan |
bufferFilePrefix | String | getBufferFilePrefix() | setBufferFilePrefix(String) | null | Awalan untuk nama fail buffer luaran |
saveExtras | String | getSaveExtras() | setSaveExtras(String) | null | Data tambahan tersuai untuk dimasukkan dalam output glTF |
StlLoadOptions
Pilihan muat untuk fail 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 semasa import |
recalculateNormal | boolean | getRecalculateNormal() | setRecalculateNormal(boolean) | false | Kira semula normal daripada geometri semasa import |
contentType | FileContentType | getContentType() | setContentType(FileContentType) | – | Petunjuk untuk pengesanan STL binari vs ASCII |
StlSaveOptions
Pilihan simpan 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 semasa eksport |
axisSystem | AxisSystem | getAxisSystem() | setAxisSystem(AxisSystem) | – | Ganti sistem paksi sasaran semasa eksport |
contentType | FileContentType | getContentType() | setContentType(FileContentType) | FileContentType.BINARY | Tetapkan kepada BINARY atau ASCII untuk mengawal format output |
FbxLoadOptions
Muat pilihan untuk fail 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 semasa import |
FbxSaveOptions
Nota: Eksport FBX adalah tidak tersedia dalam edisi FOSS Java. FBX disokong untuk import sahaja. The FbxSaveOptions kelas wujud dalam API tetapi akan menghasilkan ralat jika digunakan untuk menyimpan. Gunakan OBJ, STL, glTF, atau GLB untuk eksport sebagai gantinya.