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

class HeightmapPainter in Tinman.Terrain.Heightmaps

The heightmap painter paints brushes onto heightmaps using background tasks.

sealed class HeightmapPainter extends Disposable
  implements IHeightmapLayers

Public / Attributes

LayerMask

The mask of heightmap layers this object uses.

public property LayerMask { get set }
type HeightmapLayer
value Bitwise combination of HeightmapLayer values.
implements IHeightmapLayers.LayerMask

Remarks:

These heightmap layers store actual terrain data:

Missing data is represented with the Coverage layer. It describes how much information is present in a stored heightmap sample. The semantics of coverage with heightmap samples is the same as premultiplied alpha with texture samples. A LayerMask without Coverage means that all samples are fully solid. If a LayerMask contains the Coverage layer but no others, the coverage values are used to represent 'holes' in the terrain (e.g. creating holes for caves, tunnels, etc.).

LifecycleState

Returns the lifecycle state of this object.

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

Public / Constructors

HeightmapPainter

Creates a new instance of HeightmapPainter.

public constructor HeightmapPainter ()

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.

ApplyBrush

Applies the given brush to the specified heightmap, without tracking the background task.

public method ApplyBrush (IBrush brush, IHeightmap heightmap, CubemapFaceRect region)
params brush [not-null] The brush to apply.
  heightmap [not-null] The heightmap to update.
  region The target region.

Remarks:

The current LayerMask will be used for the paint job.

ApplyBrushJoin

Applies the given brush to the specified heightmap.

public method ApplyBrushJoin (IBrush brush, IHeightmap heightmap, CubemapFaceRect region)
type TaskResultVoid
params brush [not-null] The brush to apply.
  heightmap [not-null] The heightmap to update.
  region The target region.
returns [not-null] The background task. The caller is responsible for properly finishing the task (see Finish.

Remarks:

The current LayerMask will be used for the paint job.

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.