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

class MeshBuffer in Tinman.Terrain.Kernel

sealed class MeshBuffer extends Disposable
  implements ICapacity
  IMemoryConsumption

Public / Attributes

Capacity

Returns the capacity of this object.

public property Capacity { get }
type int32
value [>=0] The capacity, in elements.
implements ICapacity.Capacity

CapacityUtilization

Returns the relative utilization of the vertex capacity.

public property CapacityUtilization { get }
type float32
value [0..100] The relative vertex utilization, in percent.

LifecycleState

Returns the lifecycle state of this object.

public virtual property LifecycleState { get }
type LifecycleState
value The lifecycle state.
inherited Disposable.LifecycleState

MemoryConsumption

Returns the estimated memory consumption of this object.

public property MemoryConsumption { get }
type int64
value [>=0] The estimated memory consumption, in bytes.
implements IMemoryConsumption.MemoryConsumption

VertexArrays

Returns the CPU vertex data collection of this mesh buffer.

public property VertexArrays { get }
type VertexArrays
value [not-null] The vertex data collection.

VertexUpdater

Returns the vertex updater of this mesh buffer.

public property VertexUpdater { get }
type IVertexUpdater
value The vertex updater or null.

Public / Constructors

Create

Creates a new instance of MeshBuffer.

[OwnerReturn]
public static method Create (VertexArrays vertexData, [Owner] IVertexUpdater vertexUpdater = null)
type MeshBuffer
params vertexData [not-null] The CPU vertex data collection.
  vertexUpdater The vertex data updater. Defaults to null.
returns [not-null] The mesh buffer object.

Public / Methods

AcquireTry

Acquires a strong reference to this disposable object.

[OwnerReturn, ThreadSafe]
public method AcquireTry ()
type IDisposable
returns this if a new strong reference has been acquired, null if this object is already being disposed.
inherited Disposable.AcquireTry

Remarks:

The object will not be actually disposed by calls to Dispose when there is at least one strong reference left. Code that calls the AcquireTry method is responsible for calling the Dispose method accordingly.

This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.

Dispose

Releases all resources held by this object if there are no more strong references to it, decrements the reference counter by one otherwise.

[Dispose, OwnerThis, ThreadSafe]
public method Dispose ()
inherited Disposable.Dispose

Remarks:

The Dispose method silently returns if the object has already been disposed.

MeshCreate

Creates a new dynamic terrain mesh.

[OwnerReturn, ThreadSafe]
public method MeshCreate ([Owner] MeshOptions options)
type IMeshDynamic
params options [not-null] The mesh options.
returns The created CLOD mesh.

MeshUpdate

Applies all buffered mesh updates, but does not update vertex data via IVertexUpdater.

public method MeshUpdate ()
type bool
returns true if the vertex/index data has changed, false if not.

Remarks:

The MeshUpdateData method must be called before vertex data is used (e.g. rendering using the GPU vertex buffer). This ensures that the mesh structure is consistent with the vertex data that has been sent to the IVertexUpdater object.

The call to MeshUpdateData may be omitted iff the vertex data is not used. Calling the MeshUpdateData more than once is allowed, but has no effect.

Exceptions:

MeshUpdateData

Performs all vertex data updates that have been left out during the last call to MeshUpdate.

public method MeshUpdateData ()

Remarks:

This method can be called multiple times, vertex data updates will only be performed once.