Class DracoFormat

DracoFormat class

Google Draco format

public class DracoFormat : 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(byte[])Decode the point cloud or mesh from memory data
Decode(string)Decode the point cloud or mesh from specified file name
Encode(Entity, DracoSaveOptions)Encode the entity to Draco raw data
Encode(Entity, Stream, DracoSaveOptions)Encode the entity to specified stream
Encode(Entity, string, DracoSaveOptions)Encode the entity to specified file
override ToString()Formats to string(Inherited from FileFormat.)

Examples

The following code shows how to encode and decode a Mesh to/from byte array:

Mesh mesh = (new Sphere()).ToMesh();
//encode mesh into Draco format
byte[] draco = FileFormat.Draco.Encode(mesh);
//decode mesh from Draco format
Mesh decodedMesh = (Mesh)FileFormat.Draco.Decode(draco);

See Also