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

class PixelLayerBuffers in Tinman.Terrain.Heightmaps.Painting

Wraps input and output buffers for pixel layers.

sealed class PixelLayerBuffers extends BrushBuffers

See also:

IPixelLayer

Public / Attributes

Heightmap

The heightmap region buffer.

public readonly field Heightmap
type HeightmapRegion
inherited BrushBuffers.Heightmap

Normals

Returns the normal buffer.

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

Remarks:

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

See also:

BrushBuffers.HeightmapDirty

Pixels

The output pixel buffer.

public readonly field Pixels
type ColorBuffer

Slopes

Returns the slope buffer.

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

Remarks:

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

See also:

BrushBuffers.HeightmapDirty

Step

The sample step distance of the input data.

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

Remarks:

Defaults to 1.

Public / Constructors

PixelLayerBuffers

Creates a new instance of PixelLayerBuffers.

public constructor PixelLayerBuffers (HeightmapRegion heightmap, ColorBuffer pixels = null)
params heightmap [not-null] The input heightmap region buffer.
  pixels The output pixel buffer. If null, a new buffer will be created. Defaults to null.

Pool

Creates a new instance of IObjectPoolFactory that creates PixelLayerBuffers objects.

public static method Pool (int32 width, int32 height, HeightmapLayer layers)
type IObjectPoolFactory<PixelLayerBuffers>
params width [>0] The buffer width, in pixels.
  height [>0] The buffer height, in pixels.
  layers The heightmap layers.
returns [not-null] The object pool factory.

Remarks:

The following values will be reset when a PixelLayerBuffers object is fetched from the pool:

The buffer contents are undefined.

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.
inherited BrushBuffers.HeightmapDirty

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:

BrushBuffers.Normals
BrushBuffers.Slopes