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

class VertexBufferUpdater in Tinman.Terrain.Kernel

An implementation of the IVertexUpdater interface that generates binary vertex data using an IVertexFormat and stores it in an IVertexBuffer.

sealed class VertexBufferUpdater extends VertexUpdater

Public / Attributes

LifecycleState

Returns the lifecycle state of this object.

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

VertexBuffer

The vertex buffer to update.

public property VertexBuffer { get set }
type IVertexBuffer
value The vertex buffer or null.

VertexFormat

The vertex format to use.

public property VertexFormat { get set }
type IVertexFormat
value The vertex format or null.

Public / Constructors

VertexBufferUpdater

Creates a new instance of VertexBufferUpdater.

public constructor VertexBufferUpdater (IVertexFormat vertexFormat = null)
params vertexFormat The initial vertex format (see VertexFormat). Defaults to null.

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.

Begin

Begins an access to this object.

public override method Begin ()
implements VertexUpdater.Begin

Remarks:

See the documentation of the class which implements this interface for details on the operations that must be wrapped in Begin and End calls.

See also:

BeginEnd

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.

End

Ends the current access to this object.

public override method End ()
implements VertexUpdater.End

Remarks:

See the documentation of the class which implements this interface for details on the operations that must be wrapped in Begin and End calls.

See also:

BeginEnd

Invalidate

Causes the next call to Validate to return false.

public method Invalidate ()

Remarks:

Call this method if the vertex buffer needs to be refreshed.

SetVertexArrays

Sets the vertex data containers from which this vertex converter shall read vertex data.

public override method SetVertexArrays (VertexArrays vertexArrays)
params vertexArrays [not-null] The vertex data collection.
overrides VertexUpdater.SetVertexArrays

Validate

Validates this vertex updater.

public override method Validate ()
type bool
returns true if the vertex updater is valid and can consume vertex data updates, false if it is invalid (vertex updates must be discarded).
overrides VertexUpdater.Validate

Remarks:

When a vertex updater becomes invalid, a full vertex update will become necessary once the update is valid again.

VertexUpdate

Updates data for the given vertices.

[BeginEnd]
public override method VertexUpdate (int32[] vertices, int32 count)
params vertices [not-null] An array that holds the vertex indices.
  count [>0] Total number of indices to read from vertices.
implements VertexUpdater.VertexUpdate

Remarks:

A typical implementation will read vertex data from the VertexArrays object, construct some application-specific vertex value and store that value in some kind of vertex buffer (e.g. for rendering).

VertexUpdateAll

Updates data for all vertices.

[BeginEnd]
public override method VertexUpdateAll ()
overrides VertexUpdater.VertexUpdateAll

Remarks:

A typical implementation will read vertex data from the VertexArrays object, construct some application-specific vertex value and store that value in some kind of vertex buffer (e.g. for rendering).