ترميز 3D شبكة في ملف Google Draco
Contents
[
Hide
]
يسمح Aspose.3D for .NET API للمطورين بـ استيراد طراز 3D ، ثم ترميز الشبكات في ملفات Google Draco. يمكن للمطورين أيضًا تحديد الموضع ، إحداثيات النسيج ، واللون والبتات العادية بالإضافة إلى مستوى الضغط قبل تشفير شبكة.
استرداد شبكة 3D وترميز في ملف Google Draco
يمكن استخدام طريقة Encode
التي تعرضها فئة DracoFormat
لترميز شبكة ثلاثية الأبعاد في ملف Google Draco. يتطلب الأمر وجود كائنات Mesh
و DracoSaveOptions
كمعلمات. باستخدام خيارات الحفظ Draco ، يمكن للمطورين أيضًا تحديد الموضع ، إحداثيات النسيج ، واللون والبتات العادية بالإضافة إلى مستوى الضغط قبل تشفير شبكة.
Pروغرامينغ ple وافرة
This code example retrieves a Mesh
of Sphere
, and then encode in the Google Draco file after specifying a compression level.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-3d/Aspose.3D-for-.NET | |
// Create a sphere | |
var sphere = new Sphere(); | |
// Encode the sphere to Google Draco raw data using optimal compression level. | |
var b = FileFormat.Draco.Encode(sphere.ToMesh(), | |
new DracoSaveOptions() { CompressionLevel = DracoCompressionLevel.Optimal }); | |
// Save the raw bytes to file | |
File.WriteAllBytes(RunExamples.GetOutputFilePath("SphereMeshtoDRC_Out.drc"), b); |