Load and Save Options

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.

FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
fileFormatFileFormatgetFileFormat()التنسيق المرتبط بهذا التكوين (للقراءة فقط)

SaveOptions

الفئة الأساسية لجميع كائنات خيار الحفظ. يمتد A3DObject.

FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
fileFormatFileFormatgetFileFormat()التنسيق المرتبط بهذا التكوين (للقراءة فقط)

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);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseعكس نظام الإحداثيات عند الاستيراد
enableMaterialsbooleangetEnableMaterials()setEnableMaterials(boolean)trueتحميل المرفق .mtl material file
scaledoublegetScale()setScale(double)1.0تطبيق مقياس موحد على جميع الهندسة المستوردة
normalizeNormalbooleangetNormalizeNormal()setNormalizeNormal(boolean)trueتطبيع المتجهات العادية المستوردة إلى طول وحدة

ObjSaveOptions

خيارات الحفظ لملفات Wavefront OBJ.

import com.aspose.threed.*;

ObjSaveOptions opts = new ObjSaveOptions();
opts.setEnableMaterials(false);
scene.save("output.obj", opts);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
applyUnitScalebooleangetApplyUnitScale()setApplyUnitScale(boolean)falseتطبيق معامل مقياس الوحدة للمشهد على الإحداثيات المصدرة
pointCloudbooleangetPointCloud()setPointCloud(boolean)falseتصدير الرؤوس فقط (بدون أوجه متعددة الأضلاع)
verbosebooleangetVerbose()setVerbose(boolean)falseإدراج تعليقات OBJ إضافية في الناتج
serializeWbooleangetSerializeW()setSerializeW(boolean)falseاكتب المكوّن W لنقاط التحكم
enableMaterialsbooleangetEnableMaterials()setEnableMaterials(boolean)trueاكتب a .mtl ملف material وارجع إليه من الـ .obj
flipCoordinateSystembooleangetFlipCoordinateSystem()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);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseاقلب نظام الإحداثيات عند الاستيراد
prettyPrintbooleangetPrettyPrint()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);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
contentTypeFileContentTypegetContentType()setContentType(FileContentType)FileContentType.ASCIIتعيين إلى FileContentType.BINARY لإنشاء ملف GLB مستقل؛ تعيين إلى FileContentType.ASCII لـ JSON .gltf مع مخزن مؤقت خارجي
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseعكس نظام الإحداثيات عند التصدير
prettyPrintbooleangetPrettyPrint()setPrettyPrint(boolean)falseقم بتنسيق JSON الناتج مع المسافات البادئة لسهولة القراءة
bufferFilePrefixStringgetBufferFilePrefix()setBufferFilePrefix(String)nullبادئة لأسماء ملفات الـ buffer الخارجية
saveExtrasStringgetSaveExtras()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);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseعكس نظام الإحداثيات عند الاستيراد
recalculateNormalbooleangetRecalculateNormal()setRecalculateNormal(boolean)falseإعادة حساب المتجهات العمودية من الهندسة عند الاستيراد
contentTypeFileContentTypegetContentType()setContentType(FileContentType)تلميح لاكتشاف STL الثنائي مقابل ASCII

StlSaveOptions

خيارات الحفظ لإخراج STL.

import com.aspose.threed.*;

StlSaveOptions opts = new StlSaveOptions();
opts.setContentType(FileContentType.BINARY);
scene.save("output.stl", opts);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseعكس نظام الإحداثيات عند التصدير
axisSystemAxisSystemgetAxisSystem()setAxisSystem(AxisSystem)تجاوز نظام المحاور المستهدف عند التصدير
contentTypeFileContentTypegetContentType()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);
FbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptionsFbxSaveOptions
flipCoordinateSystembooleangetFlipCoordinateSystem()setFlipCoordinateSystem(boolean)falseعكس نظام الإحداثيات عند الاستيراد

FbxSaveOptions

ملاحظة: تصدير FBX هو غير متوفر في نسخة Java FOSS. يتم دعم FBX للاستيراد فقط. The FbxSaveOptions الفئة موجودة في الـ API ولكنها ستنتج خطأ إذا استُخدمت للحفظ. استخدم OBJ أو STL أو glTF أو GLB للتصدير بدلاً من ذلك.


انظر أيضًا

 العربية