TerrainLayer

Description

sealed class Tinman.Engine.Components.TerrainLayer

Derived from

Disposable abstract
IComparable<TerrainLayer>

The TerrainLayer class represents a layer of a terrain mesh.

Depending on the type, a terrain layer may represent one of the following:

Public / Constants

Sort​Index​Base


public constant SortIndexBase → (-1000:float32)

Sort index value (-1000) for the implicit layer of type TerrainLayerType.Base.

Sort​Index​Material


public constant SortIndexMaterial → (-0.5:float32)

Sort index value (-0.5) for the implicit layer of type TerrainLayerType.Material.

Sort​Index​Maximum


public constant SortIndexMaximum → (999:float32)

Maximum sort index value (999) for layers of type TerrainLayerType.Texture and TerrainLayerType.Region.

Sort​Index​Minimum


public constant SortIndexMinimum → (-999:float32)

Minimum sort index value (-999) for layers of type TerrainLayerType.Texture and TerrainLayerType.Region.

Public / Methods

Texture​Progress


[Pure]
public method TextureProgress → (1)

view in : TerrainView

[not-null]
The terrain view.

returns → int32

The texturing progress, in percent.

Returns the progress of unique terrain texturing for the given view.

If this terrain layer is not used by the given view in, this method will return 100.

Public / Attributes

Flags


public attribute Flags → (get,set)

value : TerrainLayerFlags

The terrain layer flags.

The terrain layer flags.

Defaults to TerrainLayerFlags.None.

Has​Base


public attribute HasBase → (get)

value : bool

true if this layer renders the base terrain mesh with vertex colors,
false if not.

Does this layer show the base terrain mesh with vertex colors?

Has​Materials


public attribute HasMaterials → (get)

value : bool

true if this layer renders terrain materials,
false if not.

Does this layer show terrain materials?

Has​Region


public attribute HasRegion → (get)

value : bool

true if this layer renders highlights for the regions of a dataset,
false if not.

Does this layer show highlights for the regions of a dataset?

Has​Texture


public attribute HasTexture → (get)

value : bool

true if this layer renders unique terrain textures,
false if not.

Does this layer show unique terrain textures?

Is​Empty


public attribute IsEmpty → (get)

value : bool

true if this terrain layer is empty, false if not.

Is this terrain layer empty, i.e. it does not show any data?

Is​Opaque


public attribute IsOpaque → (get)

value : bool

true if this terrain layer is opaque, false if not.

Is this terrain layer opaque, when rendered with a distance fade range of Fade.AlwaysOne?

Lighting


public attribute Lighting → (get)

value : int32

The lighting style:
< 0 : lighting with per-vertex normal vectors (see Semantic.Normal).
= 0 : no lighting (see TerrainLayerFlags.NoLighting)
> 0 : lighting with normal-mapping (see TerrainSlotMapping.Normal).

Returns the lighting style of this layer.

Material


public attribute Material → (get)

value : TerrainLayerMaterial

The settings object or null iff this layer is not of type TerrainLayerType.Material.

The terrain material settings.

Name


public attribute Name → (get,set)

value : string

The layer name or null.

Human-readable name of this layer, for informational purposes only.

Opaque​Mask


public attribute OpaqueMask → (get,set)

value : int32

The opaque mask.

Bitmask that determines when a sequence of layers is considered to be opaque.

Defaults to 0.

Prepare


public attribute Prepare → (get,set)

value : bool

true to prepare the content of the terrain layer while invisible,
false to build it only while visible.

Prepare the content of the terrain layer when it is not visible?

Defaults to false.

Range


public attribute Range → (get,set)

value : Fade

The layer distance fade range.

The distance range in which this terrain layer is visible.

Defaults to Fade.AlwaysOne, i.e. the layer is always visible.

Region


public attribute Region → (get)

value : TerrainLayerRegion

The settings object or null iff this layer is not of type TerrainLayerType.Region.

The dataset region highlight settings.

Sort​Index


public attribute SortIndex → (get)

value : float32

The layer sort index.

The sort index value of this terrain layer.

Layers with larger sort index values are rendered on top of those with smaller sort index values.

Texture


public attribute Texture → (get)

value : TerrainLayerTexture

The settings object or null iff this layer is not of type TerrainLayerType.Texture.

The terrain texture settings.

Type


public attribute Type → (get)

value : TerrainLayerType

The layer type.

Returns the terrain layer type.

Visible


public attribute Visible → (get,set)

value : bool

true to show the terrain layer,
false to hide it.

Shall the terrain layer be visible?

Defaults to true.

Logging

Logger


public static readonly attribute Logger → (ILogger)

The logger object of this class.