The PlantingOptions class provides various settings for tuning the behaviour of a Planting object.
class
|
PlantingOptions
|
base of
|
TerrainPlanting
|
Is this PlantingOptions ready for being used for planting?
public
virtual
property
|
CanPlant
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
planting
options
object
is
ready,
false
if
not. |
Determines the overall density of planted geometry instances.
public
property
|
Density
{
get
set
}
|
||
type
|
float32
|
||
value
|
|
The
density,
in
terrain-space.
If
0 ,
planting
is
disabled. |
Remarks:
The density value is interpreted as the average distance between geometry instances.
The
default
value
is
1
.
Limits the minimum and maximum distance from the camera to the planting location.
public
property
|
Distance
{
get
set
}
|
||
type
|
RangeF
|
||
value
|
The distance range, in terrain-space. |
Remarks:
Geometry instances will not be planted outside of this distance range.
The distance range is used in conjunction with Radius in order to improve the performance of PlantMesh.
The default value is Zero.
Constraints planting to the given terrain-space elevation range.
public
property
|
Elevation
{
get
set
}
|
||
type
|
RangeF
|
||
value
|
The distance range, in terrain-space. |
Remarks:
Geometry instances will not be planted outside of this elevation range.
The elevation range is used in conjunction with ElevationMinMax in order to improve the performance of PlantMesh.
The default value is Max.
The geometry ID of the planted geometry instances.
public
property
|
GeometryId
{
get
set
}
|
||
type
|
int32
|
||
value
|
The geometry ID. |
Remarks:
The geometry ID is forwarded to InstancePlant.
The
default
value
is
0
.
The surface material to plant geometry instances on.
public
property
|
Material
{
get
set
}
|
||
type
|
int32
|
||
value
|
|
The
material
ID
(see
MaterialToken).
Use
-1
to
plant
everywhere,
regardless
of
materials.
|
Remarks:
If the Material vertex array is not present, planting will be performed everywhere. If present, the 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 MaterialMask in order to improve the performance of PlantMesh.
The
default
value
is
-1
.
The probability for planting geometry instances.
public
property
|
Probability
{
get
set
}
|
||
type
|
float32
|
||
value
|
|
The probability. |
Remarks:
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
.
The scatter amount to apply when planting geometry instances.
public
property
|
Scatter
{
get
set
}
|
||
type
|
float32
|
||
value
|
|
The scatter amount. |
Remarks:
The
default
value
is
1
.
The material weight range to use for planting.
public
property
|
Weight
{
get
set
}
|
||
type
|
RangeI
|
||
value
|
The material weight range (see MaterialToken). |
Remarks:
Geometry instances will not be planted if the material weight is outside of this range.
The material weight is used in conjunction with MaterialRange in order to improve the performance of PlantMesh.
The default value is [0..255].
Creates a new instance of PlantingOptions.
public
constructor
|
PlantingOptions
()
|
Creates a new instance of PlantingOptions.
public
constructor
|
PlantingOptions
(PlantingOptions options)
|
||
params
|
options
|
[not-null]
|
The options to copy from. |
public
method
|
Check
(float32 distance,
float32 radius,
int64 material)
|
||
type
|
bool
|
||
params
|
distance
|
||
radius
|
|||
material
|