TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

interface IBufferCodec in Tinman.Terrain.Codec

Base interface for sample buffers that supporting encoding/decoding of buffer sample blocks to losslessly compressed byte sequences.

interface IBufferCodec base of ColorBuffer
  TexelBuffer

Attributes

BufferSize

Returns the size in bytes of the uncompressed samples in this buffer.

property BufferSize { get }
type int32
value [>0] The uncompressed buffer size, in bytes.

Methods

BufferDecode

Decodes a block of samples in this buffer.

method BufferDecode (ByteBuffer input, int32 x, int32 y)
params input [not-null] The input buffer.
  x [0..Width] X-coordinate of top-left sample of block to decode.
  y [0..Height] Y-coordinate of top-left sample of block to decode.

BufferEncode

Encodes a block of samples in this buffer as a sequence of bytes, using lossless compression.

method BufferEncode (ByteBuffer output, int32 x, int32 y, int32 width, int32 height)
type int32
params output [not-null] The output buffer.
  x [0..Width] X-coordinate of top-left sample of block to encode.
  y [0..Height] Y-coordinate of top-left sample of block to encode.
  width [0..Width-x] Width of pixel block.
  height [0..Height-y] Height of pixel block.
returns >0: The number of bytes that have been written to output.
<0: The output buffer is too small, at least -1-n bytes are required, where n is the return value.