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

class BrushMask in Tinman.Terrain.Heightmaps.Painting

Abstract base class for IBrushMask implementations.

abstract class BrushMask implements IBrushMask

Public / Attributes

LayerMask

The mask of heightmap layers this object uses.

public abstract property LayerMask { get }
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.).

Public / Constructors

Slope

public static method Slope (float32 zero, float32 one)
type IBrushMask
params zero
  one

Public / Methods

ComputeBrushMask

Computes a coverage mask for applying only parts of a brush.

[ThreadSafe]
public abstract method ComputeBrushMask (CoverageBuffer mask, HeightmapRegion samples, object userData)
params mask [not-null] The output coverage mask.
  samples [not-null] The original heightmap samples.
  userData Optional user data object that has been passed to Apply.
implements IBrushMask.ComputeBrushMask