Working with PointCloud

Contents
[ ]

Decode Mesh

Aspose.3D for .NET allows decoding a mesh from a Draco file directly without building a scene using the Decode method of DracoFormat class. The following code snippet shows how to use this functionality:

// For complete examples and data files, please go to https://github.com/aspose-3d/Aspose.3D-for-.NET
var pointCloud = (PointCloud)FileFormat.Draco.Decode("point_cloud_no_qp.drc");

Encode Mesh

Aspose.3D for .NET allows encoding a sphere mesh to a Draco file directly without building a scene using the Encode method of DracoFormat class. The following code snippet shows how to use this functionality:

// For complete examples and data files, please go to https://github.com/aspose-3d/Aspose.3D-for-.NET
FileFormat.Draco.Encode(new Sphere(), "sphere.drc");

Encode Sphere as PointCloud

Aspose.3D for .NET allows encoding a sphere mesh to Draco file as a point cloud using the Encode method of DracoFormat class. The following code snippet shows how to use this functionality:

// For complete examples and data files, please go to https://github.com/aspose-3d/Aspose.3D-for-.NET
FileFormat.Draco.Encode(new Sphere(), "sphere.drc", new DracoSaveOptions() { PointCloud = true });

Encode Mesh to PLY

Aspose.3D for .NET allows encoding a mesh to PLY file directly without building a scene using the Encode method of PlyFormat class. The following code snippet shows how to use this functionality:

// For complete examples and data files, please go to https://github.com/aspose-3d/Aspose.3D-for-.NET
FileFormat.PLY.Encode(new Sphere(), "sphere.ply");

Decode Mesh From PLY

Aspose.3D for .NET allows decoding a mesh/point cloud from a PLY file using the Decode method of PlyFormat class. The following code snippet shows how to use this functionality:

// For complete examples and data files, please go to https://github.com/aspose-3d/Aspose.3D-for-.NET
FileFormat.PLY.Encode(new Sphere(), "sphere.ply");

Export to PLY as PointCloud

Aspose.3D for .NET allows exporting a scene to PLY as PointCloud using the Encode method of PlyFormat class. The following code snippet shows how to use this functionality:

// For complete examples and data files, please go to https://github.com/aspose-3d/Aspose.3D-for-.NET
FileFormat.PLY.Encode(new Sphere(), "sphere.ply", new PlySaveOptions() { PointCloud = true });

Export 3D Scene as Point Cloud

Aspose.3D for .NET allows exporting a 3D scene as PointCloud using PointCloud property of ObjSaveOptions class. The following code snippet shows how to use this functionality:

// For complete examples and data files, please go to https://github.com/aspose-3d/Aspose.3D-for-.NET
var scene = new Scene(new Sphere());
scene.Save("Export3DSceneAsPointCloud.obj", new ObjSaveOptions() { PointCloud = true });