IMeshStructureUpdater

Description

interface Tinman.Terrain.Kernel.IMeshStructureUpdater

Derived from

IDataUpdater

Extended by

MeshStructureUpdaterList sealed
StructuredBufferUpdater sealed

Base interface for classes that process mesh structure updates.

Mesh structure updates are performed inside of MeshBuffer.MeshUpdate. This is the sequence of method calls for mesh structure updates:

  1. IDataUpdater.Validate (returns true)

  2. IBeginEnd.Begin

  3. Update, to update the modified mesh structure.

  4. IBeginEnd.End

The mesh structure buffer is a sequence of 32-bit integer values, using the following indexing scheme:

buffer[vertex * 6 + 0] := LL-child of vertex (not premultiplied) or -1 if none.
buffer[vertex * 6 + 1] := LR-child of vertex (not premultiplied) or -1 if none.
buffer[vertex * 6 + 2] := RL-child of vertex (not premultiplied) or -1 if none.
buffer[vertex * 6 + 3] := RR-child of vertex (not premultiplied) or -1 if none.
buffer[vertex * 6 + 4] := Grand-parent of vertex (not premultiplied) or -1 if none.
buffer[vertex * 6 + 5] := Ancestor of vertex (not premultiplied) or -1 if none.

where vertex is the vertex index.

See also

XDag

Public / Methods

Update


[BeginEnd]
public method Update → (2)

updates in : int32 [ ]

[not-null]
An array that holds the mesh structure updates

count in : int32

[>0]
Total number of array elements to read from updates in; each pair of array elements represents a mesh structure update.

Applies the given mesh structure updates.

The mesh structure updates in are encoded as follows:

updates[index * 2 + 0] := mesh structure buffer index
updates[index * 2 + 1] := updated mesh structure value

where index is the zero-based index of a mesh structure update.