Struct EncodeResult
Contains encoded data and additional meta information. The responsibility to dispose this struct and the native resources behind it (via Dispose()) is handed over to the receiver.
Implements
Inherited Members
Namespace: Draco.Encode
Assembly: solution.dll
Syntax
public struct EncodeResult : IDisposable
Constructors
EncodeResult(IntPtr, uint, uint, Dictionary<VertexAttribute, (uint identifier, int dimensions)>)
Constructs an EncodeResult.
Declaration
public EncodeResult(IntPtr dracoEncoder, uint indexCount, uint vertexCount, Dictionary<VertexAttribute, (uint identifier, int dimensions)> vertexAttributes)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | dracoEncoder | Native Draco encoder instance. |
uint | indexCount | Number of indices. |
uint | vertexCount | Number of vertices. |
Dictionary<VertexAttribute, (uint identifier, int dimensions)> | vertexAttributes | For each vertex attribute type there's a tuple containing the draco identifier and the attribute dimensions (e.g. 3 for 3D positions). |
Fields
data
Encoded data
Declaration
public readonly NativeArray<byte> data
Field Value
Type | Description |
---|---|
NativeArray<byte> |
indexCount
Number of triangle indices
Declaration
public readonly uint indexCount
Field Value
Type | Description |
---|---|
uint |
vertexAttributes
Vertex attribute to Draco property ID mapping
Declaration
public readonly Dictionary<VertexAttribute, (uint identifier, int dimensions)> vertexAttributes
Field Value
Type | Description |
---|---|
Dictionary<VertexAttribute, (uint identifier, int dimensions)> |
vertexCount
Number vertices
Declaration
public readonly uint vertexCount
Field Value
Type | Description |
---|---|
uint |
Methods
Dispose()
Releases allocated resources.
Declaration
public void Dispose()