Load and Save Options — Aspose.3D FOSS for Java
FbxSaveOptions
جميع عمليات الاستيراد والتصدير تقبل كائن خيارات اختياري مشتق من LoadOptions أو SaveOptions. مرّر الفئة الفرعية المناسبة إلى Scene.open() أو Scene.save() للتحكم في السلوك الخاص بالتنسيق.
FbxSaveOptions: com.aspose.threed
import com.aspose.threed.*;LoadOptions
الفئة الأساسية لجميع كائنات خيارات التحميل. Extends A3DObject.
| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|
fileFormat | FileFormat | getFileFormat() | التنسيق المرتبط بهذا التكوين (للقراءة فقط) |
SaveOptions
الفئة الأساسية لجميع كائنات خيار الحفظ. يمتد A3DObject.
| FbxSaveOptions | FbxSaveOptions | FbxSaveOptions | FbxSaveOptions |
|---|---|---|---|
fileFormat | FileFormat | getFileFormat() | التنسيق المرتبط بهذا التكوين (للقراءة فقط) |
ObjLoadOptions
خيارات التحميل لملفات 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 | عكس نظام الإحداثيات عند الاستيراد |
enableMaterials | boolean | getEnableMaterials() | setEnableMaterials(boolean) | true | تحميل المرفق .mtl material file |
scale | double | getScale() | setScale(double) | 1.0 | تطبيق مقياس موحد على جميع الهندسة المستوردة |
normalizeNormal | boolean | getNormalizeNormal() | setNormalizeNormal(boolean) | true | تطبيع المتجهات العادية المستوردة إلى طول وحدة |
ObjSaveOptions
خيارات الحفظ لملفات 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 | تطبيق معامل مقياس الوحدة للمشهد على الإحداثيات المصدرة |
pointCloud | boolean | getPointCloud() | setPointCloud(boolean) | false | تصدير الرؤوس فقط (بدون أوجه متعددة الأضلاع) |
verbose | boolean | getVerbose() | setVerbose(boolean) | false | إدراج تعليقات OBJ إضافية في الناتج |
serializeW | boolean | getSerializeW() | setSerializeW(boolean) | false | اكتب المكوّن W لنقاط التحكم |
enableMaterials | boolean | getEnableMaterials() | setEnableMaterials(boolean) | true | اكتب a .mtl ملف material وارجع إليه من الـ .obj |
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | اقلب نظام الإحداثيات عند التصدير |
GltfLoadOptions
خيارات التحميل لملفات glTF 2.0 و 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 | اقلب نظام الإحداثيات عند الاستيراد |
prettyPrint | boolean | getPrettyPrint() | setPrettyPrint(boolean) | false | تنسيق مخرجات JSON مع المسافات البادئة لسهولة القراءة |
GltfSaveOptions
خيارات الحفظ لتنسيق glTF 2.0 وإخراج 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 | تعيين إلى FileContentType.BINARY لإنشاء ملف GLB مستقل؛ تعيين إلى FileContentType.ASCII لـ JSON .gltf مع مخزن مؤقت خارجي |
flipCoordinateSystem | boolean | getFlipCoordinateSystem() | setFlipCoordinateSystem(boolean) | false | عكس نظام الإحداثيات عند التصدير |
prettyPrint | boolean | getPrettyPrint() | setPrettyPrint(boolean) | false | قم بتنسيق JSON الناتج مع المسافات البادئة لسهولة القراءة |
bufferFilePrefix | String | getBufferFilePrefix() | setBufferFilePrefix(String) | null | بادئة لأسماء ملفات الـ buffer الخارجية |
saveExtras | String | getSaveExtras() | setSaveExtras(String) | null | بيانات إضافية مخصصة لتضمينها في ناتج glTF |
StlLoadOptions
خيارات التحميل لملفات 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 | عكس نظام الإحداثيات عند الاستيراد |
recalculateNormal | boolean | getRecalculateNormal() | setRecalculateNormal(boolean) | false | إعادة حساب المتجهات العمودية من الهندسة عند الاستيراد |
contentType | FileContentType | getContentType() | setContentType(FileContentType) | – | تلميح لاكتشاف STL الثنائي مقابل ASCII |
StlSaveOptions
خيارات الحفظ لإخراج 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 | عكس نظام الإحداثيات عند التصدير |
axisSystem | AxisSystem | getAxisSystem() | setAxisSystem(AxisSystem) | – | تجاوز نظام المحاور المستهدف عند التصدير |
contentType | FileContentType | getContentType() | setContentType(FileContentType) | FileContentType.BINARY | تعيين إلى BINARY أو ASCII للتحكم في تنسيق الإخراج |
FbxLoadOptions
تحميل الخيارات لملفات 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 | عكس نظام الإحداثيات عند الاستيراد |
FbxSaveOptions
ملاحظة: تصدير FBX هو غير متوفر في نسخة Java FOSS. يتم دعم FBX للاستيراد فقط. The FbxSaveOptions الفئة موجودة في الـ API ولكنها ستنتج خطأ إذا استُخدمت للحفظ. استخدم OBJ أو STL أو glTF أو GLB للتصدير بدلاً من ذلك.