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

class BrushBuffers in Tinman.Terrain.Heightmaps.Painting

Helper object that allows reusing of buffers when applying brushes to heightmaps.

class BrushBuffers base of PixelLayerBuffers

Remarks

A brush is applied to a heightmap by passing its Apply method to the combine parameter of the UpdateRegion method. To avoid temporary buffers being created repeatedly, an instance of BrushBuffers can be passed to the userData parameter for each updated region.

See also:

IBrush

Public / Attributes

Heightmap

The heightmap region buffer.

public readonly field Heightmap
type HeightmapRegion

Normals

Returns the normal buffer.

public property Normals { get }
type NormalBuffer
value [not-null] The computed normal buffer.

Remarks:

The normal buffer is (re-)computed after HeightmapDirty has been called with Elevation or when the value of Step is modified.

See also:

HeightmapDirty

Slopes

Returns the slope buffer.

public property Slopes { get }
type SlopeBuffer
value [not-null] The computed slope buffer.

Remarks:

The normal buffer is (re-)computed after HeightmapDirty has been called with Elevation or when the value of Step is modified.

See also:

HeightmapDirty

Step

The sample step distance of the input data.

public property Step { get set }
type int32
value [>=1] The sample step value.

Remarks:

Defaults to 1.

Public / Constructors

BrushBuffers

Creates a new instance of BrushBuffers.

public constructor BrushBuffers (HeightmapRegion heightmap)
params heightmap [not-null] The heightmap region buffer.

Public / Methods

HeightmapDirty

Marks the given layers of Heightmap as dirty.

public method HeightmapDirty (HeightmapLayer layers = HeightmapLayer.All)
params layers The heightmap layers to mark as dirty. Defaults to All.

Remarks:

This method needs to be called after the samples of Heightmap have been modified, to make sure that dependent computations will be performed again.

See also:

Normals
Slopes