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

class MaterialKeys in Tinman.Terrain.Util

sealed class MaterialKeys implements IConfigurable

Configuration

Config

The configurator object for this type.

public static property Config { get }
type IConfigurator<MaterialKeys>
value [not-null] The configurator object.

Public / Attributes

DefaultMaterial

The default material token to use if no material keys match.

public property DefaultMaterial { get }
type int64
value The default material token.

Remarks:

Defaults to material 0.

Public / Constructors

Distinct

Creates a new instance of MaterialKeys that uses distinct color keys for each material.

public static method Distinct ()
type MaterialKeys
returns [not-null] The material keys.

See also:

Colors.Distinct

MaterialKeys

Creates a new instance of MaterialKeys.

public constructor MaterialKeys (int64 defaultMaterial = 0)
params defaultMaterial The default material. Defaults to 0.

Public / Methods

Add

Add a material key.

public method Add (MaterialKey materialKey)
type MaterialKeys
params materialKey The material key.
returns [not-null] this

ToColor

Returns the color key of the given material.

public method ToColor (int64 token)
type int64
params token The material token.
returns The color key.

ToConfig

Returns the configuration value that describes this object.

public method ToConfig ()
type ConfigValue
returns [not-null] The configuration value.
implements IConfigurable.ToConfig

Remarks:

All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.

The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.

Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.

ToMaterial

Returns the material token for the given color key.

public method ToMaterial (int64 color)
type int64
params color The color key.
returns The material token.