PlyFormat.Decode

Decode(string)

从指定的流中解码点云或网格。

public Geometry Decode(string fileName)
参数类型描述
fileName字符串输入流

返回值

一个 MeshPointCloud 实例

示例

以下代码展示了如何从 PLY 文件解码网格:

//生成用于解码的测试文件
FileFormat.PLY.Encode(new Sphere(), "sphere.ply");
//解码文件
var mesh = (Mesh)FileFormat.PLY.Decode("sphere.ply")

另请参见


Decode(string, PlyLoadOptions)

从指定的流中解码点云或网格。

public Geometry Decode(string fileName, PlyLoadOptions opt)
参数类型描述
fileName字符串输入流
optPlyLoadOptionsPLY 格式的加载选项

返回值

一个 MeshPointCloud 实例

示例

以下代码展示了如何从 PLY 文件解码网格:

//生成用于解码的测试文件
FileFormat.PLY.Encode(new Sphere(), "sphere.ply");
//解码文件
var mesh = (Mesh)FileFormat.PLY.Decode("sphere.ply")

另请参见


Decode(Stream)

从指定的流中解码点云或网格。

public Geometry Decode(Stream stream)
参数类型描述
streamStream输入流

返回值

一个 MeshPointCloud 实例

示例

以下代码展示了如何从 PLY 文件解码网格:

//生成用于解码的测试文件
FileFormat.PLY.Encode(new Sphere(), "sphere.ply");
//解码文件
var mesh = (Mesh)FileFormat.PLY.Decode("sphere.ply")

另请参见


Decode(Stream, PlyLoadOptions)

从指定的流中解码点云或网格。

public Geometry Decode(Stream stream, PlyLoadOptions opt)
参数类型描述
streamStream输入流
optPlyLoadOptionsPLY 格式的加载选项

返回值

一个 MeshPointCloud 实例

示例

以下代码展示了如何从 PLY 文件解码网格:

//生成用于解码的测试文件
FileFormat.PLY.Encode(new Sphere(), "sphere.ply");
//解码文件
var mesh = (Mesh)FileFormat.PLY.Decode("sphere.ply")

另请参见