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

class TerrainBuffer in Tinman.AddOns.Components

The TerrainBuffer component is used as a shared buffer by zero or more TerrainMesh components.

sealed class TerrainBuffer extends Disposable
  implements IResourceHandle

Remarks

TerrainBuffer objects act as resource handles and produce TerrainBufferResource resource objects.

See also:

TerrainBufferOptions

Public / Attributes

LifecycleState

Returns the lifecycle state of this object.

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

MeshBuffer

The wrapped MeshBuffer object.

public property MeshBuffer { get }
type MeshBuffer
value [not-null] The mesh buffer.

OnClearCache

This event is triggered during ClearCache, just before the method returns.

public property OnClearCache { get }
type IEvent
value The event 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.

ClearCache

Clears the texture cache.

public method ClearCache ()

See also:

TerrainBufferOptions.CachePath

CreateResource

Creates a new resource object, using the given graphics context.

[OwnerReturn]
public method CreateResource (Graphics graphics)
type IResource
params graphics [not-null] The graphics context to use.
returns The resource object or null.
implements IResourceHandle.CreateResource

Remarks:

Resource objects may implement the IMemoryConsumption interface. In this case, the reported memory consumption will be interpreted as an estimate on how much GPU memory is consumed by the resource. This estimate can then be used for resource caching (e.g. CacheMemory).

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.

Equals

Compares this object with the given one.

[Pure]
public method Equals (IResourceHandle other)
type bool
params other The object to compare to.
returns true if this object is equal to other, false if not.
implements IEquatable.Equals

GetHashCode

[Pure]
public override method GetHashCode ()
type int32