HeightmapShape

Description

sealed class Tinman.Terrain.Heightmaps.HeightmapShape

A vector shape for generating heightmap data.

Heightmap shapes are always specified for heightmaps of size HeightmapsUtil.MaxSize. Scaling is performed automatically, if necessary (see HeightmapsUtil.ComputeScaleToMaxSize).

Public / Constructors

For

2 overloads


public static method For1 → (4)

shape in : IShape

[not-null]
The input shape.

data in : HeightmapSamples

[not-null]
Heightmap sample data for each vertex of the input shape (see IShape.VertexAt).

falloff in : float64

[>=0]
Shape distance falloff value.

layer opt : int32 = 0

The layer of the shape (higher values are on top of others).

returns → HeightmapShape

The heightmap shape.

Builds a heightmap shape.


public static method For2 → (4)

shape in : IShape

[not-null]
The input shape.

data in : HeightmapSample

The uniform heightmap sample data to use for the interior of shape in.

falloff in : float64

[>=0]
Shape distance falloff value.

layer opt : int32 = 0

The layer of the shape (higher values are on top of others).

returns → HeightmapShape

The heightmap shape.

Builds a heightmap shape.

Public / Methods

Falloff​Set


public method FalloffSet → (1)

falloff in : float64

[>=0]
The falloff value.

returns → HeightmapShape

The resulting heightmap shape.

Sets the distance falloff value.

Sample


public method Sample → (1)

sample in : HeightmapSample

The uniform heightmap sample data.

returns → HeightmapShape

The resulting heightmap shape.

Sets the uniform heightmap sample data.

Samples


public method Samples → (1)

samples in : HeightmapSamples

[not-null]
The per-vertex heightmap sample data.

returns → HeightmapShape

The resulting heightmap shape.

Sets the per-vertex heightmap sample data.

Public / Attributes

Falloff


public attribute Falloff → (get)

value : float64

[>=0]
The falloff value, specified as a distance in horizontal units of the shape coordinate system, see CoordinateSystem.HorizontalUnit.

Shape distance falloff value.

The HeightmapSample.Coverage of rasterized heightmap samples will be 100% when rasterized sample shape distance of zero or less. The coverage smoothly reduces to zero when the distance between the rasterized sample and the shape reached the given falloff value.

Rasterizer


public attribute Rasterizer → (get)

value : IShapeRasterizer<HeightmapRegion>

[not-null]
The rasterizer object.

The shape rasterizer.

Configuration

Config


public static attribute Config → (get)

value : IConfigurator<HeightmapShape>

[not-null]
The configurator object.

The configurator object for this type.

Serialization

Serial​Id


public static readonly attribute SerialId → (ISerialTypeInfo)

Serialization information about this type.