PlyFormat.Decode

Decode(string)

Decode a point cloud or mesh from the specified stream.

public Geometry Decode(string fileName)
ParameterTypeDescription
fileNameStringThe input stream

Return Value

A Mesh or PointCloud instance

Examples

The following code shows how to decode a mesh from a PLY file:

//Generate a test file for decoding
FileFormat.PLY.Encode(new Sphere(), "sphere.ply");
//Decode the file
var mesh = (Mesh)FileFormat.PLY.Decode("sphere.ply")

See Also


Decode(string, PlyLoadOptions)

Decode a point cloud or mesh from the specified stream.

public Geometry Decode(string fileName, PlyLoadOptions opt)
ParameterTypeDescription
fileNameStringThe input stream
optPlyLoadOptionsThe load option of PLY format

Return Value

A Mesh or PointCloud instance

Examples

The following code shows how to decode a mesh from a PLY file:

//Generate a test file for decoding
FileFormat.PLY.Encode(new Sphere(), "sphere.ply");
//Decode the file
var mesh = (Mesh)FileFormat.PLY.Decode("sphere.ply")

See Also


Decode(Stream)

Decode a point cloud or mesh from the specified stream.

public Geometry Decode(Stream stream)
ParameterTypeDescription
streamStreamThe input stream

Return Value

A Mesh or PointCloud instance

Examples

The following code shows how to decode a mesh from a PLY file:

//Generate a test file for decoding
FileFormat.PLY.Encode(new Sphere(), "sphere.ply");
//Decode the file
var mesh = (Mesh)FileFormat.PLY.Decode("sphere.ply")

See Also


Decode(Stream, PlyLoadOptions)

Decode a point cloud or mesh from the specified stream.

public Geometry Decode(Stream stream, PlyLoadOptions opt)
ParameterTypeDescription
streamStreamThe input stream
optPlyLoadOptionsThe load option of PLY format

Return Value

A Mesh or PointCloud instance

Examples

The following code shows how to decode a mesh from a PLY file:

//Generate a test file for decoding
FileFormat.PLY.Encode(new Sphere(), "sphere.ply");
//Decode the file
var mesh = (Mesh)FileFormat.PLY.Decode("sphere.ply")

See Also