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

interface IColorFunction in Tinman.Terrain.Procedural

Base interface for classes that compute procedural color noise values.

interface IColorFunction extends INoiseFunctionOps<int64, IColorFunction>
  base of ColorFunction

Attributes

ConstantValue

For constant noise functions, returns the constant value. For all others, the default value of TValue is returned.

property ConstantValue { get }
type TValue
value The constant value.
inherited INoiseFunction.ConstantValue

IsConstant

Does this noise function return a constant value?

property IsConstant { get }
type bool
value true if this noise function is constant, false if not.
inherited INoiseFunctionBase.IsConstant

Remarks:

A constant noise function computes the same value for all input coordinates.

SerialType

Returns the serial type of this object.

property SerialType { get }
type ISerialTypeInfo
value [not-null] The serial type.
inherited ISerializable.SerialType

SerialVersion

Returns the serial data version.

property SerialVersion { get }
type int32
value [>=1] The serial data version tag.
inherited ISerializable.SerialVersion

Remarks:

An ISerializable implementation is required to support all versions up to the one returned by SerialVersion.

See also:

ISerializable.Serialize
ISerializable.Deserialize

Methods

Add

Returns a color function that sums the color values of the given function and this one.

[Pure]
method Add (IColorFunction function)
type IColorFunction
params function [not-null] The color function to add.
returns [not-null] The resulting color function.

Remarks:

result := this + function

See also:

Colors.Add

Blend

Returns a color function that blends the color values returned by this color function with the color values returned by the given color function.

[Pure]
method Blend (IColorFunction function)
type IColorFunction
params function [not-null] The color function.
returns [not-null] The resulting color function.

See also:

Colors.Blend

ComputeValue

Computes the noise value for the given input vector.

method ComputeValue (Vec3D v)
type TValue
params v Coordinate of input vector.
returns The noise value.
inherited INoiseFunction.ComputeValue

Computes the noise value for the given input vector.

method ComputeValue (float64 x, float64 y, float64 z)
type TValue
params x X-coordinate of input vector.
  y Y-coordinate of input vector.
  z Z-coordinate of input vector.
returns The noise value.
inherited INoiseFunction.ComputeValue

Deserialize

Initializes the state of this object from the given data stream.

method Deserialize (int32 serialVersion, ISerializer data)
type ISerializable
params serialVersion [>=1] The serial data version.
  data [not-null] The serial data stream.
returns [not-null] The deserialized object. This will typically be this, but in some circumstances, another instance may be returned (e.g. singletons).
inherited ISerializable.Deserialize

Remarks:

The Deserialize method will be called immediately after the object has been instantiated via its default constructor.

The provided serialVersion number is guaranteed to be equal to or less than the SerialVersion returned by this object (i.e. ISerializable object must provide backwards compatibility).

See also:

ISerializable.Serialize
ISerializable.SerialVersion

HasConstantValue

Does this noise function have the given constant value?

method HasConstantValue (TValue value)
type bool
params value The constant value.
returns true if this noise function has the given constant value, false if not.
inherited INoiseFunction.HasConstantValue

Linear

Applies a linear transformation on the output value of this noise function.

[Pure]
method Linear (TValue scale, TValue offset)
type TNoise
params scale Linear coefficient of output transform.
  offset Linear coefficient of output transform.
returns [not-null] The resulting noise function.
inherited INoiseFunctionOps.Linear

Remarks:

result = noise * scale + offset
where noise is this noise function and result is the returned noise function.

LinearBase

Applies a linear transformation on the output value of this noise function.

[Pure]
method LinearBase (TValue scale, TValue offset)
type INoiseFunction<TValue>
params scale Linear coefficient of output transform.
  offset Linear coefficient of output transform.
returns [not-null] The resulting noise function.
inherited INoiseFunction.LinearBase

Remarks:

result = noise * scale + offset
where noise is this noise function and result is the returned noise function.

Mul

Returns a color function that multiplies the color values returned by this color function with the color values returned by the given color function.

[Pure]
method Mul (IColorFunction function)
type IColorFunction
params function [not-null] The color function.
returns [not-null] The resulting color function.

Remarks:

result := this * factor

See also:

Colors.Mul

Serialize

Serializes the current state of this object to the given data stream.

method Serialize (ISerializer data)
params data [not-null] The serial data stream.
inherited ISerializable.Serialize

See also:

ISerializable.Deserialize
ISerializable.SerialVersion

Simplify

Simplifies this noise function, if possible.

[Pure]
method Simplify ()
type TNoise
returns [not-null] The simplified noise function or this.
inherited INoiseFunctionOps.Simplify

SimplifyBase

Simplifies this noise function, if possible.

[Pure]
method SimplifyBase ()
type INoiseFunction<TValue>
returns [not-null] The simplified noise function or this.
inherited INoiseFunction.SimplifyBase

Sub

Returns a color function that subtracts the color values returned by the given color function from the color values returned by this color function.

[Pure]
method Sub (IColorFunction function)
type IColorFunction
params function [not-null] The color function.
returns [not-null] The resulting color function.

See also:

Colors.Sub

ToConfig

Returns the configuration value that describes this object.

method ToConfig ()
type ConfigValue
returns [not-null] The configuration value.
inherited 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.

Transform

Transforms the input coordinates using the given vector function before plugging them into this noise function.

[Pure]
method Transform (IVectorFunction function)
type TNoise
params function [not-null] The vector function to use for transforming the input coordinates.
returns [not-null] The resulting noise function.
inherited INoiseFunctionOps.Transform

Extensions

AddC

Returns a noise function that adds the given color value to the noise values returned by this function.

[Pure]
method AddC (int64 value)
type IColorFunction
params value The color value to add.
returns [not-null] The resulting noise function.

Remarks:

result := this + value

MulC

Returns a noise function that multiplies the noise values returned by this noise function with the given color value.

[Pure]
method MulC (int64 value)
type IColorFunction
params value The color value to multiply with.
returns [not-null] The resulting noise function.

Remarks:

result := this * value

Op

Applies the given function operator to this noise function and the given one (for binary operators only).

method Op (ColorOp op, IColorFunction other = null)
type IColorFunction
params op The operation to use.
  other The other noise function or null if op is unary.
returns [not-null] The resulting noise function.

OpC

Applies the given function operator to this noise function and the given color value (for binary operators only).

method OpC (ColorOp op, int64 value)
type IColorFunction
params op The operation to use.
  value The color value to combine with.
returns [not-null] The resulting noise function.

SubC

Returns a noise function that subtracts the given color value from the noise values returned by this noise function.

[Pure]
method SubC (int64 value)
type IColorFunction
params value The color value to subtract.
returns [not-null] The resulting noise function.

Remarks:

result := this - value