Convert esh esh من كائن واحد 3D في ملف PLY

Rereate كائن 3D وحفظه إلى ملف PLY

Tانه فوق تحميل EncodeMesh أعضاء يتعرض من قبل فئة PlyFormat يمكن استخدامها لتحويل Mesh من كائن 3D إلى ملف PLY. The EncodeMesh أعضاء تأخذ Mesh ، اسم ملف الإخراج و PlySaveOptions الكائنات كمعلمات. Uالغناء PLY حفظ الخيارات ، يمكن للمطورين تغيير اسم مكونات التنسيق.

Pروغرامينغ ple وافرة

Tمثال التعليمات البرمجية له يخلق كائن ylinder 3D C، ثم ترميز في ملف PLY.

C#

 // Create a cylinder object and save it to ply file

FileFormat.PLY.EncodeMesh(new Cylinder(), "cylinder.ply");

/* using Ply save options*/

//Save as binary PLY format, the default value is ASCII

PlySaveOptions opt = new PlySaveOptions(FileContentType.Binary);

//change the components to 's' and 't'

opt.TextureCoordinateComponents.Item1 = "s";

opt.TextureCoordinateComponents.Item2 = "t";

//save the mesh

FileFormat.PLY.EncodeMesh(new Cylinder(), "cylinder.ply", opt);