HeightmapSamples

Description

sealed class Tinman.Terrain.Heightmaps.HeightmapSamples

The HeightmapSamples class is a container for storing unrelated heightmap samples.

Public / Constructors

HeightmapSamples


public constructor HeightmapSamples → (2)

capacity in : int32

[>0]
The capacity, in heightmap samples.

layers opt : HeightmapLayer = HeightmapLayer.All

The heightmap layers.

Creates a new instance of HeightmapSamples.

Public / Methods

Clear


public method Clear → (4)

voidOrDefault opt : bool = true

Clear to HeightmapSample.Void (true) or to HeightmapSample.Default (false)?

offset opt : int32 = 0

[0..ICapacity.Capacity]
Offset of first sample to clear.

count opt : int32 = -1

[-1..ICapacity.Capacity-offset]
Number of heightmap samples to clear.

layers opt : HeightmapLayer = HeightmapLayer.All

The heightmap layers to clear.

Clears heightmap samples to their default values.

Clone


public method Clone → ()

returns → HeightmapSamples

The cloned buffer.

Returns a clone of this HeightmapSamples buffer.

The data arrays are shared between this buffer and the returned one. The helper objects are independent.

Copy


public method Copy → (5)

buffer in : HeightmapSamples

[not-null]
The target heightmap buffer.

count in : int32

[>=0]
Number of samples to copy.

layers opt : HeightmapLayer = HeightmapLayer.All

The heightmap layers to copy.

source opt : int32 = 0

[0..ICapacity.Capacity]
Offset to first source sample to copy.

target opt : int32 = 0

[0..buffer.Capacity]
Offset to first source sample to copy.

Copies heightmap samples from this buffer to the given one.

Public / Attributes

Coverage


public attribute Coverage → (int32 [ ])

The relative sample coverage values or null if IHeightmapLayers.LayerMask does not contain the HeightmapLayer.Coverage flag.

Displacement


public attribute Displacement → (int32 [ ])

The normalized displacement values or null if IHeightmapLayers.LayerMask does not contain the HeightmapLayer.Displacement flag.

Elevation


public attribute Elevation → (int32 [ ])

The normalized elevation values or null if IHeightmapLayers.LayerMask does not contain the HeightmapLayer.Elevation flag.

Helper


public attribute Helper → (HeightmapSamplesHelper)

A helper object that is attached to this heightmap sample buffer.

Heightmaps can attach private helper objects to heightmap samples buffers in order to optimize subsequent heightmap accesses using the same buffer.

Material


public attribute Material → (int64 [ ])

The token (see MaterialToken) values that describe the material of the terrain surface or null if IHeightmapLayers.LayerMask does not contain the HeightmapLayer.Material flag.

Texture


public attribute Texture → (int64 [ ])

The color (see Colors) values that describe the texture of the terrain surface or null if IHeightmapLayers.LayerMask does not contain the HeightmapLayer.Texture flag.