翻譯|產品更新|編輯:李顯亮|2019-07-09 14:06:50.080|閱讀 318 次
概述:Aspose.3D for .NET更新至v19.7,在Google Draco中添加點云導出支持!
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
Aspose.3D for .NET是一個功能豐富的游戲軟件和計算機輔助設計(CAD)API,用于處理3D文檔格式,無需任何3D建模和渲染軟件依賴。支持Discreet3DS、WavefrontOBJ、FBX(ASCII,二進制)、STL(ASCII,二進制)、Universal3D、Collada、glTF、GLB、PLY、DirectX、Google Draco文件格式等。
Aspose.3D for .NET更新至v19.7,在Google Draco中添加點云導出支持!>>歡迎下載Aspose.3D for .NET最新試用版
key | 概述 | 類別 |
---|---|---|
THREEDNET-449 | 節點中的轉換值存在問題 | 功能 |
THREEDNET-526 | 在Google Draco中添加點云導出支持 | 增強 |
THREEDNET-524 | 在Google Draco中添加點云導入支持 | 增強 |
THREEDNET-523 | 以PLY格式添加點云支持 | 增強 |
▲向類Aspose.ThreeD.Formats.DracoFormat添加了新的解碼方法
////// Decode the point cloud or mesh from specified file name //////The file name contains the drc file///Aorinstance depends on the file contentpublic Geometry Decode(string fileName); ////// Decode the point cloud or mesh from memory data //////The raw drc bytes///Aorinstance depends on the contentpublic Geometry Decode(byte[] data)
用于直接從draco文件解碼網格而不構建場景的示例代碼:
var pointCloud = (PointCloud) FileFormat.Draco.Decode("pointCloud.drc");
▲向類Aspose.ThreeD.Formats.DracoFormat添加了新的編碼方法
////// Encode the entity to specified stream //////The entity to be encoded///The stream that encoded data will be written to///Extra options for encoding the point cloudpublic void Encode(Entity entity, Stream stream, DracoSaveOptions options = null); ////// Encode the entity to specified file //////The entity to be encoded///The file name to be written///Extra options for encoding the point cloudpublic void Encode(Entity entity, string fileName, DracoSaveOptions options = null); ////// Encode the entity to Draco raw data //////The entity to be encoded///Extra options for encoding the point cloud///The encoded draco data represented in bytespublic byte[] Encode(Entity entity, DracoSaveOptions options = null);
用于直接將球體網格編碼為draco文件而不構建場景的示例代碼:
FileFormat.Draco.Encode(new Sphere(), "sphere.drc");
▲將新方法PointCloud添加到Aspose.ThreeD.Formats.DracoSaveOptions類
////// Export the scene as point cloud, default value is false. ///public bool PointCloud { get; set; }
用于將球體網格編碼為draco文件作為點云的示例代碼:
FileFormat.Draco.Encode(new Sphere(), "sphere.drc", new DracoSaveOptions() {PointCloud = true});
▲添加了新方法對Aspose.ThreeD.Formats.PlyFormat類進行編碼
////// Encode the entity and save the result into the stream. //////The entity to encode///The stream to write to, this method will not close this stream///Save optionspublic void Encode(Entity entity, Stream stream, PlySaveOptions opt = null); ////// Encode the entity and save the result into an external file. //////The entity to encode///The file to write to///Save optionspublic void Encode(Entity entity, string fileName, PlySaveOptions opt = null);
用于直接將網格編碼為ply文件而不構建場景的示例代碼:
FileFormat.PLY.Encode(new Sphere(), "sphere.ply");
▲為Aspose.ThreeD.Formats.PlyFormat類添加了新方法解碼
////// Decode a point cloud or mesh from the specified stream. //////The input stream///The load option of PLY format///Aorinstancepublic Geometry Decode(string fileName, PlyLoadOptions opt = null); ////// Decode a point cloud or mesh from the specified stream. //////The input stream///The load option of PLY format///Aorinstancepublic Geometry Decode(Stream stream, PlyLoadOptions opt = null);
用于解碼ply文件中的網格/點云的示例代碼:
var geom = FileFormat.PLY.Decode("sphere.ply");
▲將屬性PointCloud添加到Aspose.ThreeD.Formats.PlySaveOptions類
////// Export the scene as point cloud, the default value is false. ///public bool PointCloud { get; set; }
用于強制導出場景以作為點云的示例代碼:
FileFormat.PLY.Encode(new Sphere(), "sphere.ply", new PlySaveOptions(){PointCloud = true});
歡迎加入ASPOSE技術交流QQ群(642018183),各類資源及時分享,歡迎交流討論!
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn