مشهد التصدير إلى تنسيق مضغوط AMF

Contents
[ ]

مشهد التصدير إلى تنسيق مضغوط AMF

Aspose.3D for Java يقدم فئة AmfSaveOptions التي تسمح لك بتعيين القيمة المنطقية للضغط وفقًا لمتطلباتك. افتراضيًا ، يتم تعيين القيمة إلى true. يعرض مقتطف الشفرة التالي وظائف كاملة لإنشاء ملف تنسيق AMF مضغوط:

// For complete examples and data files, please go to https://github.com/aspose-3d/Aspose.3D-for-Java
// The path to the documents directory.
String MyDir = RunExamples.getDataDir();
Scene scene = new Scene();
Box box = new Box();
Transform tr = scene.getRootNode().createChildNode(box).getTransform();
tr.setScale(new Vector3(12, 12, 12));
tr.setTranslation(new Vector3(10, 0, 0));
tr = scene.getRootNode().createChildNode(box).getTransform();
tr.setScale(new Vector3(5, 5, 5));
tr.setEulerAngles(new Vector3(50, 10, 0));
scene.getRootNode().createChildNode();
scene.getRootNode().createChildNode().createChildNode(box);
scene.getRootNode().createChildNode().createChildNode(box);
AMFSaveOptions opt = new AMFSaveOptions();
opt.setEnableCompression(false);
scene.save(MyDir + "test.amf", opt);