Load and Save Options — Aspose.3D FOSS for Java
Properties
Tüm içe ve dışa aktarma işlemleri, türetilen isteğe bağlı bir seçenek nesnesi kabul eder LoadOptions veya SaveOptions. Uygun alt sınıfı şuraya gönderin Scene.open() veya Scene.save() format‑özel davranışı kontrol etmek için.
Properties: com.aspose.threed
import com.aspose.threed.*;LoadOptions
Tüm yük‑seçeneği nesneleri için temel sınıf. Extends A3DObject.
| Properties | Properties | Properties | Properties |
|---|---|---|---|
fileFormat | FileFormat | getFileFormat() | Bu yapılandırmanın ilişkili olduğu format (yalnızca okunur) |
SaveOptions
Tüm kaydet‑seçeneği nesneleri için temel sınıf. Extends A3DObject.
| Properties | Properties | Properties | Properties |
|---|---|---|---|
fileFormat | FileFormat | getFileFormat() | Bu yapılandırmanın ilişkili olduğu format (salt okunur) |
ObjLoadOptions
Wavefront OBJ dosyaları için yükleme seçenekleri (.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);| Properties | Properties | Properties | Properties | Properties | Properties |
|---|---|---|---|---|---|
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | İçe aktarırken koordinat sistemini ters çevir |
enableMaterials | boolean | getEnableMaterials() | setEnableMaterials(boolean) | true | Eşlik eden dosyayı yükle .mtl malzeme dosyası |
scale | double | getScale() | setScale(double) | 1.0 | Tüm içe aktarılan geometriye uygulanan tekdüze ölçek |
normalizeNormal | boolean | getNormalizeNormal() | setNormalizeNormal(boolean) | true | İçe aktarılan normal vektörleri birim uzunluğa normalize et |
ObjSaveOptions
Wavefront OBJ dosyaları için kaydetme seçenekleri.
import com.aspose.threed.*;
ObjSaveOptions opts = new ObjSaveOptions();
opts.setEnableMaterials(false);
scene.save("output.obj", opts);| Properties | Properties | Properties | Properties | Properties | Properties |
|---|---|---|---|---|---|
applyUnitScale | boolean | getApplyUnitScale() | setApplyUnitScale(boolean) | false | Sahnenin birim ölçek faktörünü dışa aktarılan koordinatlara uygula |
pointCloud | boolean | getPointCloud() | setPointCloud(boolean) | false | Yalnızca köşe noktalarını dışa aktar (poligon yüzleri yok) |
verbose | boolean | getVerbose() | setVerbose(boolean) | false | Çıktıya ek OBJ yorumları ekle |
serializeW | boolean | getSerializeW() | setSerializeW(boolean) | false | Kontrol noktalarının W bileşenini yaz |
enableMaterials | boolean | getEnableMaterials() | setEnableMaterials(boolean) | true | Bir yaz .mtl malzeme dosyası ve ondan referans ver .obj |
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Dışa aktarırken koordinat sistemini ters çevir |
GltfLoadOptions
glTF 2.0 ve GLB dosyaları için yükleme seçenekleri (.gltf, .glb).
import com.aspose.threed.*;
GltfLoadOptions opts = new GltfLoadOptions();
opts.setFlipCoordinateSystem(true);
Scene scene = new Scene();
scene.open("model.gltf", opts);| Properties | Properties | Properties | Properties | Properties | Properties |
|---|---|---|---|---|---|
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | İçe aktarırken koordinat sistemini ters çevir |
prettyPrint | boolean | getPrettyPrint() | setPrettyPrint(boolean) | false | Okunabilirlik için girintili JSON çıktısını biçimlendir |
GltfSaveOptions
glTF 2.0 ve GLB çıktısı için kaydetme seçenekleri.
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);| Properties | Properties | Properties | Properties | Properties | Properties |
|---|---|---|---|---|---|
contentType | FileContentType | getContentType() | setContentType(FileContentType) | FileContentType.ASCII | Şu değere ayarla FileContentType.BINARY kendi içinde GLB dosyası üretmek için; şu değere ayarla FileContentType.ASCII JSON için .gltf harici bir tamponla |
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Dışa aktarırken koordinat sistemini ters çevir |
prettyPrint | boolean | getPrettyPrint() | setPrettyPrint(boolean) | false | Çıktı JSON’ı okunabilirlik için girintili biçimlendir |
bufferFilePrefix | String | getBufferFilePrefix() | setBufferFilePrefix(String) | null | Harici tampon dosya adları için önek |
saveExtras | String | getSaveExtras() | setSaveExtras(String) | null | glTF çıktısına dahil edilecek özel ek veriler |
StlLoadOptions
STL dosyaları için yükleme seçenekleri (.stl).
import com.aspose.threed.*;
StlLoadOptions opts = new StlLoadOptions();
opts.setFlipCoordinateSystem(true);
Scene scene = new Scene();
scene.open("part.stl", opts);| Properties | Properties | Properties | Properties | Properties | Properties |
|---|---|---|---|---|---|
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | İçe aktarırken koordinat sistemini ters çevir |
recalculateNormal | boolean | getRecalculateNormal() | setRecalculateNormal(boolean) | false | İçe aktarırken geometri üzerinden normalleri yeniden hesapla |
contentType | FileContentType | getContentType() | setContentType(FileContentType) | – | İkili vs ASCII STL algılaması için ipucu |
StlSaveOptions
STL çıktısı için kaydetme seçenekleri.
import com.aspose.threed.*;
StlSaveOptions opts = new StlSaveOptions();
opts.setContentType(FileContentType.BINARY);
scene.save("output.stl", opts);| Properties | Properties | Properties | Properties | Properties | Properties |
|---|---|---|---|---|---|
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | Dışa aktarırken koordinat sistemini ters çevir |
axisSystem | AxisSystem | getAxisSystem() | setAxisSystem(AxisSystem) | – | Dışa aktarırken hedef eksen sistemini geçersiz kıl |
contentType | FileContentType | getContentType() | setContentType(FileContentType) | FileContentType.BINARY | Şuna ayarla BINARY veya ASCII çıktı formatını kontrol etmek için |
FbxLoadOptions
FBX dosyaları için yükleme seçenekleri (.fbx).
import com.aspose.threed.*;
FbxLoadOptions opts = new FbxLoadOptions();
opts.setFlipCoordinateSystem(true);
Scene scene = new Scene();
scene.open("animation.fbx", opts);| Properties | Properties | Properties | Properties | Properties | Properties |
|---|---|---|---|---|---|
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | İçe aktarırken koordinat sistemini ters çevir |
FbxSaveOptions
Not: FBX dışa aktarımı mevcut değil Java FOSS sürümünde. FBX yalnızca içe aktarma için desteklenir. FbxSaveOptions class API’de mevcut ancak kaydetmek için kullanılırsa bir hata üretir. Bunun yerine dışa aktarma için OBJ, STL, glTF veya GLB kullanın.