DracoFormat.Encode
Contents
[
Hide
]Encode(Entity, Stream, DracoSaveOptions)
Encode the entity to specified stream
public void Encode(Entity entity, Stream stream, DracoSaveOptions options = null)
Parameter | Type | Description |
---|---|---|
entity | Entity | The entity to be encoded |
stream | Stream | The stream that encoded data will be written to |
options | DracoSaveOptions | Extra options for encoding the point cloud |
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
- class Entity
- class DracoSaveOptions
- class DracoFormat
- namespace Aspose.ThreeD.Formats
- assembly Aspose.3D
Encode(Entity, string, DracoSaveOptions)
Encode the entity to specified file
public void Encode(Entity entity, string fileName, DracoSaveOptions options = null)
Parameter | Type | Description |
---|---|---|
entity | Entity | The entity to be encoded |
fileName | String | The file name to be written |
options | DracoSaveOptions | Extra options for encoding the point cloud |
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
- class Entity
- class DracoSaveOptions
- class DracoFormat
- namespace Aspose.ThreeD.Formats
- assembly Aspose.3D
Encode(Entity, DracoSaveOptions)
Encode the entity to Draco raw data
public byte[] Encode(Entity entity, DracoSaveOptions options = null)
Parameter | Type | Description |
---|---|---|
entity | Entity | The entity to be encoded |
options | DracoSaveOptions | Extra options for encoding the point cloud |
Return Value
The encoded draco data represented in bytes
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
- class Entity
- class DracoSaveOptions
- class DracoFormat
- namespace Aspose.ThreeD.Formats
- assembly Aspose.3D