BrushBounds

Description

abstract class Tinman.Terrain.Heightmaps.Painting.BrushBounds

Describes the target location when applying a brush to a heightmap.

Public / Constructors

Canvas


public static method Canvas → (7)

width in : int32

[>0]
The width of the brush bounds, in samples.

height in : int32

[>0]
The height of the brush bounds, in samples.

canvas in : CoordinateSystem

[not-null]
The geo-referenced canvas.

in : Vec2D

First brush corner on canvas (see A).

in : Vec2D

Second brush corner on canvas (see B).

in : Vec2D

Third brush corner on canvas (see C).

in : Vec2D

Fourth brush corner on canvas (see D).

returns → BrushBounds

The brush bounds object.

Creates a new instance of BrushBounds for painting onto a geo-referenced canvas.

Heightmap and brush samples will be projected automatically as required to transform between heightmap space and brush space. For this to work, all input and output heightmaps must have a proper geo-reference, which is projectible to canvas in.

Rect


public static method Rect → (1)

bounds in : CubemapFaceRect

The cubemap face rectangle.

returns → BrushBounds

The brush bounds object.

Creates a new instance of BrushBounds for painting directly onto a cubemap face.

Heightmap samples are mapped one-to-one to brush samples, no automatic resampling is performed. Thus, the calling code is responsible for making sure that all input and output heightmaps have consistent sizes (see IHeightmap.Size), so that bounds in is interpreted in a meaningful way.

Public / Methods

Get​Region


public abstract method GetRegion → (3)

heightmap in : IHeightmap

[not-null]
The heightmap to read from.

output in : HeightmapRegion

[not-null]
The output buffer for the brush samples.

layers in : HeightmapLayer

The heightmap layers to fetch.

Fetches the brush samples from the given heightmap.

IOException

If an I/O error has occurred.

GeorefException

If the available geo-reference information is incomplete or malformed and brush samples must be projected to resp. from another coordinate system.

Set​Region


public abstract method SetRegion → (3)

heightmap in : IHeightmap

[not-null]
The heightmap to write to.

input in : HeightmapRegion

[not-null]
The input buffer holding the brush samples.

layers in : HeightmapLayer

The heightmap layers to store.

Stores the brush samples in the given heightmap.

IOException

If an I/O error has occurred.

GeorefException

If the available geo-reference information is incomplete or malformed and brush samples must be projected to resp. from another coordinate system.

Public / Attributes

Height


public readonly attribute Height → (int32)

Height of the brush bounds, in samples.

Width


public readonly attribute Width → (int32)

Width of the brush bounds, in samples.

Protected / Constructors

Brush​Bounds


protected constructor BrushBounds → (2)

width in : int32

See Width.

height in : int32

See Height.

Creates a new instance of BrushBounds.