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

class HeightmapShape in Tinman.Terrain.Heightmaps

A vector shape for generating heightmap data.

sealed class HeightmapShape implements IMapShapeGeneric<HeightmapShape>
  extends SerializableBase

Remarks

Heightmap shapes are always specified for heightmaps of size MaxSize. Scaling is performed automatically, if necessary (see ComputeScaleToMaxSize).

See also:

HeightmapBuilder.Shapes

Configuration

Config

The configurator object for this type.

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

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.

Serialization

SerialId

Serialization information about this type.

public static readonly field SerialId
type ISerialTypeInfo

Public / Attributes

Falloff

Shape distance falloff value.

public property Falloff { get }
type float64
value [>=0] The falloff value.

Layer

The layer of the shape.

public property Layer { get }
type int32
value The shape layer.
implements IMapShape.Layer

Remarks:

Map shapes with higher layer values are rendered on top.

MapShape

The vector shape to render.

public property MapShape { get }
type IShape
value [not-null] The vector shape.
implements IMapShape.MapShape

Rasterizer

The shape rasterizer.

public property Rasterizer { get }
type IShapeRasterizer<HeightmapRegion>
value [not-null] The rasterizer object.

SerialType

Returns the serial type of this object.

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

SerialVersion

Returns the serial data version.

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

Remarks:

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

See also:

ISerializable.Serialize
ISerializable.Deserialize

Public / Constructors

For

Builds a heightmap shape.

public static method For (IShape shape, HeightmapSamples data, float64 falloff, int32 layer = 0)
type HeightmapShape
params shape [not-null] The input shape.
  data [not-null] Heightmap sample data for each vertex of the input shape (see VertexAt).
  falloff [>=0] Shape distance falloff value.
  layer The layer of the shape (higher values are on top of others). Defaults to 0.
returns [not-null] The heightmap shape.

Builds a heightmap shape.

public static method For (IShape shape, HeightmapSample data, float64 falloff, int32 layer = 0)
type HeightmapShape
params shape [not-null] The input shape.
  data The uniform heightmap sample data to use for the interior of shape.
  falloff [>=0] Shape distance falloff value.
  layer The layer of the shape (higher values are on top of others). Defaults to 0.
returns [not-null] The heightmap shape.

Public / Methods

Deserialize

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

public override 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).
overrides SerializableBase.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

FalloffSet

Sets the distance falloff value.

public method FalloffSet (float64 falloff)
type HeightmapShape
params falloff [>=0] The falloff value.
returns [not-null] The resulting heightmap shape.

LayerSet

Sets the map shape layer (see Layer).

public method LayerSet (int32 layer)
type HeightmapShape
params layer The shape layer.
returns [not-null] The resulting map shape.
implements IMapShapeGeneric.LayerSet

MapShapeCubemap

Converts the map shape to a cubemap, if necessary.

public method MapShapeCubemap (float64 accuracy = 0)
type HeightmapShape
params accuracy [>=0] Optional accuracy to use for subdivision of edges. Given as a maximum error in the target coordinate system. Set to 0 to disable edge subdivision. Defaults to 0.
returns [not-null] The resulting map shape.
implements IMapShapeGeneric.MapShapeCubemap

See also:

IShape.TransformCubemap

MapShapeSet

Sets the map shape (see MapShape).

public method MapShapeSet (IShape shape)
type HeightmapShape
params shape The new shape.
returns The resulting map shape or null if shape is null.
implements IMapShapeGeneric.MapShapeSet

MapShapeTransform

Converts the map shape to the given coordinate system.

public method MapShapeTransform (CoordinateSystem coordSys, float64 accuracy = 0)
type HeightmapShape
params coordSys [not-null] The target coordinate system.
  accuracy [>=0] Optional accuracy to use for subdivision of edges. Given as a maximum error in the target coordinate system. Set to 0 to disable edge subdivision. Defaults to 0.
returns The resulting map shape or null if empty.
implements IMapShapeGeneric.MapShapeTransform

Sample

Sets the uniform heightmap sample data.

public method Sample (HeightmapSample sample)
type HeightmapShape
params sample The uniform heightmap sample data.
returns [not-null] The resulting heightmap shape.

Samples

Sets the per-vertex heightmap sample data.

public method Samples (HeightmapSamples samples)
type HeightmapShape
params samples [not-null] The per-vertex heightmap sample data.
returns [not-null] The resulting heightmap shape.

Serialize

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

public override method Serialize (ISerializer data)
params data [not-null] The serial data stream.
overrides SerializableBase.Serialize

See also:

ISerializable.Deserialize
ISerializable.SerialVersion