DracoFormat.Decode

Decode(string)

Decode the point cloud or mesh from specified file name

public Geometry Decode(string fileName)
ParameterTypeDescription
fileNameStringThe file name contains the drc file

Return Value

A Mesh or PointCloud instance depends on the file content

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


Decode(byte[])

Decode the point cloud or mesh from memory data

public Geometry Decode(byte[] data)
ParameterTypeDescription
dataByte[]The raw drc bytes

Return Value

A Mesh or PointCloud instance depends on the content

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