Load and Save Options

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.

PropertiesPropertiesPropertiesProperties
fileFormatFileFormatgetFileFormat()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.

PropertiesPropertiesPropertiesProperties
fileFormatFileFormatgetFileFormat()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);
PropertiesPropertiesPropertiesPropertiesPropertiesProperties
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseİçe aktarırken koordinat sistemini ters çevir
enableMaterialsbooleangetEnableMaterials()setEnableMaterials(boolean)trueEşlik eden dosyayı yükle .mtl malzeme dosyası
scaledoublegetScale()setScale(double)1.0Tüm içe aktarılan geometriye uygulanan tekdüze ölçek
normalizeNormalbooleangetNormalizeNormal()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);
PropertiesPropertiesPropertiesPropertiesPropertiesProperties
applyUnitScalebooleangetApplyUnitScale()setApplyUnitScale(boolean)falseSahnenin birim ölçek faktörünü dışa aktarılan koordinatlara uygula
pointCloudbooleangetPointCloud()setPointCloud(boolean)falseYalnızca köşe noktalarını dışa aktar (poligon yüzleri yok)
verbosebooleangetVerbose()setVerbose(boolean)falseÇıktıya ek OBJ yorumları ekle
serializeWbooleangetSerializeW()setSerializeW(boolean)falseKontrol noktalarının W bileşenini yaz
enableMaterialsbooleangetEnableMaterials()setEnableMaterials(boolean)trueBir yaz .mtl malzeme dosyası ve ondan referans ver .obj
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseDış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);
PropertiesPropertiesPropertiesPropertiesPropertiesProperties
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseİçe aktarırken koordinat sistemini ters çevir
prettyPrintbooleangetPrettyPrint()setPrettyPrint(boolean)falseOkunabilirlik 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);
PropertiesPropertiesPropertiesPropertiesPropertiesProperties
contentTypeFileContentTypegetContentType()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
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseDışa aktarırken koordinat sistemini ters çevir
prettyPrintbooleangetPrettyPrint()setPrettyPrint(boolean)falseÇıktı JSON’ı okunabilirlik için girintili biçimlendir
bufferFilePrefixStringgetBufferFilePrefix()setBufferFilePrefix(String)nullHarici tampon dosya adları için önek
saveExtrasStringgetSaveExtras()setSaveExtras(String)nullglTF çı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);
PropertiesPropertiesPropertiesPropertiesPropertiesProperties
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseİçe aktarırken koordinat sistemini ters çevir
recalculateNormalbooleangetRecalculateNormal()setRecalculateNormal(boolean)falseİçe aktarırken geometri üzerinden normalleri yeniden hesapla
contentTypeFileContentTypegetContentType()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);
PropertiesPropertiesPropertiesPropertiesPropertiesProperties
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseDışa aktarırken koordinat sistemini ters çevir
axisSystemAxisSystemgetAxisSystem()setAxisSystem(AxisSystem)Dışa aktarırken hedef eksen sistemini geçersiz kıl
contentTypeFileContentTypegetContentType()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);
PropertiesPropertiesPropertiesPropertiesPropertiesProperties
flipCoordinateSystembooleangetFlipCoordinateSystem()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.


Ayrıca Bakınız

 Türkçe