PlyFormat.Encode

Encode(Entity, Stream)

Encode the entity and save the result into the stream.

public void Encode(Entity entity, Stream stream)
ParameterTypeDescription
entityEntityThe entity to encode
streamStreamThe stream to write to, this method will not close this stream

Examples

The following code shows how to encode a mesh into PLY file:

Mesh mesh = (new Sphere()).ToMesh();
//encode mesh into PLY format
FileFormat.PLY.Encode(mesh, "sphere.ply");

See Also


Encode(Entity, Stream, PlySaveOptions)

Encode the entity and save the result into the stream.

public void Encode(Entity entity, Stream stream, PlySaveOptions opt)
ParameterTypeDescription
entityEntityThe entity to encode
streamStreamThe stream to write to, this method will not close this stream
optPlySaveOptionsSave options

Examples

The following code shows how to encode a mesh into PLY file:

Mesh mesh = (new Sphere()).ToMesh();
//encode mesh into PLY format
FileFormat.PLY.Encode(mesh, "sphere.ply");

See Also


Encode(Entity, string)

Encode the entity and save the result into an external file.

public void Encode(Entity entity, string fileName)
ParameterTypeDescription
entityEntityThe entity to encode
fileNameStringThe file to write to

Examples

The following code shows how to encode a mesh into PLY file:

Mesh mesh = (new Sphere()).ToMesh();
//encode mesh into PLY format
FileFormat.PLY.Encode(mesh, "sphere.ply");

See Also


Encode(Entity, string, PlySaveOptions)

Encode the entity and save the result into an external file.

public void Encode(Entity entity, string fileName, PlySaveOptions opt)
ParameterTypeDescription
entityEntityThe entity to encode
fileNameStringThe file to write to
optPlySaveOptionsSave options

Examples

The following code shows how to encode a mesh into PLY file:

Mesh mesh = (new Sphere()).ToMesh();
//encode mesh into PLY format
FileFormat.PLY.Encode(mesh, "sphere.ply");

See Also