HeightmapFormat

Description

abstract class Tinman.Terrain.Heightmaps.Formats.HeightmapFormat

Derived from

SerializableBase abstract
IHeightmapFormat

Abstract base class for IHeightmapFormat implementations.

Public / Constructors

For

2 overloads


[Pure]
public static method For1 → (1)

format in : PixelFormat

The pixel format.

returns → IHeightmapFormat

The IHeightmapFormat object to use.

Returns a default IHeightmapFormat object for the given pixel format.

Depending on the pixel format flags, the following heightmap layer will be processed by the returned IHeightmapFormat object:


[Pure]
public static method For2 → (2)

layer in : HeightmapLayer

The target heightmap layer.

format opt : PixelFormat = PixelFormat.Truecolor | PixelFormat.SixteenBits

The pixel format.

returns → IHeightmapFormat

The IHeightmapFormat object to use.

Returns an IHeightmapFormat object for the given pixel format and target heightmap layer.

The given layer in specifies which heightmap layer will be processed by the returned IHeightmapFormat object. The format opt value is used to determine the required byte channels (i.e. red, green, blue, alpha, intensity, elevation high/low byte).

ForAll


[Pure]
public static method ForAll → (2)

layers opt : HeightmapLayer = HeightmapLayer.All

The heightmap layers.

format opt : PixelFormat = PixelFormat.Truecolor | PixelFormat.SixteenBits

The pixel format.

returns → IHeightmapFormat

The heightmap format to use.

Returns an IHeightmapFormat that contains default formats for the given layers, augmented with all mandatory layers (see Mandatory).

Mandatory


[Pure]
public static method Mandatory → (1)

format in : IHeightmapFormat

The heightmap format or null.

returns → IHeightmapFormat

The heightmap format to use.

Fixes the given IHeightmapFormat by appending all mandatory heightmap layers.

It is not necessary to use this method when creating heightmap datasets. It can be used to obtain an equivalent to the IHeightmapFormat object that the dataset is using.

Protected / Constructors

HeightmapFormat


protected constructor HeightmapFormat → (1)

serialType in : ISerialTypeInfo

[not-null]
The serial type ID.

Creates a new instance of HeightmapFormat.

Protected / Methods

AssertLayerMask


protected method AssertLayerMask → (2)

source in : string

The error source tag.

buffer in : IHeightmapLayers

The heightmap buffer.

Asserts that the given buffer has all required heightmap layers.

Configuration

Config


public static attribute Config → (get)

value : IConfigurator<IHeightmapFormat>

[not-null]
The configurator object.

The configurator object for this type.