TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class HeightmapsUtil in Tinman.Terrain.Heightmaps

static class HeightmapsUtil  

Configuration

ConfigHeightmapLayer

The configuration type for HeightmapLayer values.

public static readonly field ConfigHeightmapLayer
type IConfiguratorEnum<HeightmapLayer>

ConfigHeightmapLayers

The configuration type for HeightmapLayer values.

public static readonly field ConfigHeightmapLayers
type IConfigurator<HeightmapLayer>

Public / Constants

FirstLayer

The first heightmap data layer.

public constant FirstLayer = HeightmapLayer.Elevation
type HeightmapLayer

See also:

NextLayer

MaxCoord

The maximum value for heightmap coordinates (i.e. X, Y and Z).

public constant MaxCoord = 1073741824
type int32

MaxSize

The maximum heightmap size.

public constant MaxSize = 1073741825
type int32

MinSize

The minimum heightmap size.

public constant MinSize = 257
type int32

Public / Attributes

CacheMemory

Size of the heightmap dataset cache.

public static property CacheMemory { get set }
type int32
value [>0] The amount of cache memory, in megabytes.

See also:

Heightmap.Datasets
HeightmapBuilder.Shapes

CacheObject

Returns the cache object.

[OwnerReturn]
public static property CacheObject { get }
type IDisposable
value [not-null] The cache object.

Remarks:

The cache object is created when needed and disposed when no longer needed. By keeping the returned cache object alive, client code can avoid repeated creations / disposals if only one entity at a time is using the cache.

Public / Methods

ComputeScaleToMaxSize

Computes the factor to use to scale coordinates of a heightmap of the given size to a heightmap of MaxSize.

public static method ComputeScaleToMaxSize (int32 size)
type int32
params size [pow2+1] The heightmap size.
returns The scale factor.

ComputeShiftToMaxSize

Computes the number of bits to shift in order to scale the coordinates of a heightmap of the given size to a heightmap of MaxSize.

public static method ComputeShiftToMaxSize (int32 size)
type int32
params size [pow2+1] The heightmap size.
returns [0..22] The number of bits to shift.

ComputeSize

Computes the cubemap size for the given image info.

public static method ComputeSize (IImageInfo imageInfo)
type int32
params imageInfo [not-null] The image info.
returns [pow2+1] The rounded cubemap size or 0 if imageInfo is not georeferenced.

Computes the internal size for the given heightmap width and height.

public static method ComputeSize (int32 width, int32 height = 0)
type int32
params width The heightmap width.
  height The heightmap height. Defaults to 0.
returns [pow2+1] The internal map size.

Computes the cubemap size for the given image info.

public static method ComputeSize (IImageInfo imageInfo, out Vec4D sizeInfo)
type int32
params imageInfo [not-null] The image info.
  sizeInfo The cubemap size info:
X: [pow2+1] Smaller cubemap size.
Y: [>0] Ground sample distance of smaller cubemap size.
Z: [pow2+1] Larger cubemap size.
W: [>0] Ground sample distance of larger cubemap size.
Will be Undefined if imageInfo is not georeferenced.
returns [pow2+1] The rounded cubemap size or 0 if imageInfo is not georeferenced.

NextLayer

Returns the next data layer.

public static method NextLayer (HeightmapLayer layer)
type HeightmapLayer
params layer The current data layer.
returns The next data layer or None.

Remarks:

Heightmap layers are enumerated in this order:

See also:

FirstLayer

TranslateCoordinates

Translates the given heightmap coordinates.

public static method TranslateCoordinates (Vec3D coords, int32 sizeFrom, int32 sizeTo)
type Vec3D
params coords The source heightmap coordinates.
  sizeFrom [pow2+1] The source heightmap size.
  sizeTo [pow2+1] The target heightmap size.
returns The target heightmap coordinates.

Translates the given heightmap coordinates.

public static method TranslateCoordinates (Vec3I coords, int32 sizeFrom, int32 sizeTo)
type Vec3I
params coords The source heightmap coordinates.
  sizeFrom [pow2+1] The source heightmap size.
  sizeTo [pow2+1] The target heightmap size.
returns The target heightmap coordinates.

TranslateCoordinatesFromMaxSize

Translates the given heightmap coordinates.

public static method TranslateCoordinatesFromMaxSize (Vec3D coords, int32 sizeTo)
type Vec3D
params coords The source heightmap coordinates.
  sizeTo [pow2+1] The target heightmap size.
returns The target heightmap coordinates.

Translates the given heightmap coordinates.

public static method TranslateCoordinatesFromMaxSize (Vec3I coords, int32 sizeTo)
type Vec3I
params coords The source heightmap coordinates.
  sizeTo [pow2+1] The target heightmap size.
returns The target heightmap coordinates.

TranslateCoordinatesToMaxSize

Translates the given heightmap coordinates.

public static method TranslateCoordinatesToMaxSize (Vec3D coords, int32 sizeFrom)
type Vec3D
params coords The source heightmap coordinates.
  sizeFrom [pow2+1] The source heightmap size.
returns The target heightmap coordinates.

Translates the given heightmap coordinates.

public static method TranslateCoordinatesToMaxSize (Vec3I coords, int32 sizeFrom)
type Vec3I
params coords The source heightmap coordinates.
  sizeFrom [pow2+1] The source heightmap size.
returns The target heightmap coordinates.

Logging

Logger

The logger object of this class.

public static readonly field Logger
type ILogger