Class PlyFormat

PlyFormat class

The PLY format.

public class PlyFormat : FileFormat

Properties

NameDescription
CanExport { get; }Gets whether Aspose.3D supports export scene to current file format.(Inherited from FileFormat.)
CanImport { get; }Gets whether Aspose.3D supports import scene from current file format.(Inherited from FileFormat.)
ContentType { get; }Gets file format content type(Inherited from FileFormat.)
Extension { get; }Gets the extension name of this type.(Inherited from FileFormat.)
Extensions { get; }Gets the extension names of this type.(Inherited from FileFormat.)
FileFormatType { get; }Gets file format type(Inherited from FileFormat.)
Version { get; }Gets file format version(Inherited from FileFormat.)

Methods

NameDescription
CreateLoadOptions()Create a default load options for this file format(Inherited from FileFormat.)
CreateSaveOptions()Create a default save options for this file format(Inherited from FileFormat.)
Decode(Stream)Decode a point cloud or mesh from the specified stream.
Decode(string)Decode a point cloud or mesh from the specified stream.
Decode(Stream, PlyLoadOptions)Decode a point cloud or mesh from the specified stream.
Decode(string, PlyLoadOptions)Decode a point cloud or mesh from the specified stream.
Encode(Entity, Stream)Encode the entity and save the result into the stream.
Encode(Entity, string)Encode the entity and save the result into an external file.
Encode(Entity, Stream, PlySaveOptions)Encode the entity and save the result into the stream.
Encode(Entity, string, PlySaveOptions)Encode the entity and save the result into an external file.
override ToString()Formats to string(Inherited from FileFormat.)

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

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