使用点云

Contents
[ ]

解码网格

Aspose.3D for .NET 允许直接从 Draco 文件解码网格,而无需使用 DracoFormat 类的 Decode 方法构建场景。以下代码段显示了如何使用此功能:

// 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");

编码网格

Aspose.3D for .NET 允许直接将球体网格编码为 Draco 文件,而无需使用 DracoFormat 类的 Encode 方法构建场景。以下代码段显示了如何使用此功能:

// 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");

将球体编码为点云

Aspose.3D for .NET 允许使用 DracoFormat 类的 Encode 方法将球体网格编码为 Draco 文件作为点云。以下代码段显示了如何使用此功能:

// 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 });

将网格编码到 PLY

Aspose.3D for .NET 允许直接将网格编码为 PLY 文件,而无需使用 PlyFormat 类的 Encode 方法构建场景。以下代码段显示了如何使用此功能:

// 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");

从 PLY 解码网格

Aspose.3D for .NET 允许使用 PlyFormat 类的 Decode 方法从 PLY 文件解码网格/点云。以下代码段显示了如何使用此功能:

// 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");

作为PointCloud导出到 PLY

Aspose.3D for .NET 允许使用 PlyFormat 类的 Encode 方法将场景作为PointCloud导出到 PLY。以下代码段显示了如何使用此功能:

// 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 });

将 3D 场景导出为点云

Aspose.3D for .NET 允许使用 ObjSaveOptions 类的 PointCloud 属性将 3D 场景导出为PointCloud。以下代码段显示了如何使用此功能:

// 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 });