3D文档管理控件Aspose.3D v19.7发布上线!在Google Draco中添加点云导出支持!

Aspose.3D for .NET更新至v19.7,在Google Draco中添加点云导出支持!

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.3D v19.7中的公共API更改


添加了新类Aspose.ThreeD.Entities.PointCloud


▲向类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群(),各类资源及时分享,欢迎交流讨论!

标签:

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2019年6月6日
下一篇 2019年6月6日

相关推荐

发表回复

登录后才能评论