PlantingOptions

Description

class Tinman.Terrain.Meshing.PlantingOptions

Extended by

TerrainPlanting sealed

The PlantingOptions class provides various settings for tuning the behaviour of a Planting object.

Public / Constructors

Planting​Options

2 overloads


public constructor PlantingOptions1 → ()

Creates a new instance of PlantingOptions.


public constructor PlantingOptions2 → (1)

options in : PlantingOptions

[not-null]
The options to copy from.

Creates a new instance of PlantingOptions.

Public / Attributes

Can​Plant


public virtual attribute CanPlant → (get)

value : bool

true if this planting options object is ready, false if not.

Is this PlantingOptions ready for being used for planting?

Density


public attribute Density → (get,set)

value : float32

[>=0]
The density, in terrain-space. If 0, planting is disabled.

Determines the overall density of planted geometry instances.

The density value is interpreted as the average distance between geometry instances.

The default value is 1.

Distance


public attribute Distance → (get,set)

value : RangeF

The distance range, in terrain-space.

Limits the minimum and maximum distance from the camera to the planting location.

Geometry instances will not be planted outside of this distance range.

The distance range is used in conjunction with Semantic.Radius in order to improve the performance of mesh traversal for planting.

The default value is RangeF.Zero.

Elevation


public attribute Elevation → (get,set)

value : RangeF

The distance range, in terrain-space.

Constraints planting to the given terrain-space elevation range.

Geometry instances will not be planted outside of this elevation range.

The elevation range is used in conjunction with Semantic.ElevationMinMax in order to improve the performance of mesh traversal for planting.

The default value is RangeF.Max.

Geometry​Id


public attribute GeometryId → (get,set)

value : int32

The geometry ID.

The geometry ID of the planted geometry instances.

The geometry ID is forwarded to IPlanter.InstancePlant.

The default value is 0.

Material


public attribute Material → (get,set)

value : int32

[-1..255]
The material ID (see MaterialToken). Use -1 to plant everywhere, regardless of materials.

The surface material to plant geometry instances on.

If the Semantic.Material vertex array is not present, planting will be performed everywhere. If present, the Semantic.MaterialMask vertex array is used to improve performance, by culling mesh sectors that do not contain any relevant materials.

The material ID is used in conjunction with Semantic.MaterialMask in order to improve the performance of mesh traversal for planting.

The default value is -1.

Probability


public attribute Probability → (get,set)

value : float32

[0..1]
The probability.

The probability for planting geometry instances.

The probability is applied after a location on the terrain for planting has been chosen (i.e. according to Density).

The default value is 1.

Scatter


public attribute Scatter → (get,set)

value : float32

[0..1]
The scatter amount.

The scatter amount to apply when planting geometry instances.

The default value is 1.

Weight


public attribute Weight → (get,set)

value : RangeI

The material weight range (see MaterialToken).

The material weight range to use for planting.

Geometry instances will not be planted if the material weight is outside of this range.

The material weight is used in conjunction with Semantic.MaterialRange in order to improve the performance of mesh traversal for planting.

The default value is [0..255].