Represents a single heightmap sample.
struct
|
HeightmapSample
|
implements
|
IEquatable<HeightmapSample>
|
||
IHeightmapLayers
|
The configurator object for this type.
public
static
property
|
Config
{
get
}
|
||
type
|
IConfigurator<HeightmapSample>
|
||
value
|
|
The configurator object. |
The serialization helper object for values of HeightmapSample.
public
static
readonly
field
|
Serializer
|
||
type
|
ITypeSerializer<HeightmapSample>
|
An HeightmapSample value with full coverage and default sample values.
public
static
readonly
field
|
Default
|
||
type
|
HeightmapSample
|
Maximum absolute value for signed 30-bit scalar heightmap sample values.
public
constant
|
MaxValue30
=
1073741823
|
||
type
|
int32
|
Remarks:
Scalar
values
are
interpreted
as
normalized
values
in
the
range
[-1..1]
,
where
-1
resp.
1
corresponds
to
the
negative
resp.
positive
value
of
MaxValue30.
The
normalized
range
is
then
mapped
to
some
application-specific
range
(see
VerticalRange).
An HeightmapSample value with zero coverage and default sample values.
public
static
readonly
field
|
Void
|
||
type
|
HeightmapSample
|
The
relative
sample
coverage
value,
ranging
from
0
(no
coverage)
to
MaxValue30
(full
coverage).
public
readonly
field
|
Coverage
|
||
type
|
int32
|
See also:
MaxValue30The normalized displacement value along the terrain-space normal vector.
public
readonly
field
|
Displacement
|
||
type
|
int32
|
Remarks:
The
default
displacement
value
is
0
.
See also:
MaxValue30The normalized elevation value along the terrain-space up vector.
public
readonly
field
|
Elevation
|
||
type
|
int32
|
Remarks:
The
default
elevation
value
is
0
.
See also:
MaxValue30
public
property
|
HasFullCoverage
{
get
}
|
||
type
|
bool
|
||
value
|
public
property
|
LayerMask
{
get
}
|
||
type
|
HeightmapLayer
|
||
value
|
The token (see MaterialToken) value that describes the material of the terrain surface.
public
readonly
field
|
Material
|
||
type
|
int64
|
Remarks:
The
default
color
value
is
0
(no
material).
See also:
HeightmapLayer.MaterialThe color (see Colors) value that describes the texture of the terrain surface.
public
readonly
field
|
Texture
|
||
type
|
int64
|
Remarks:
The
default
color
value
is
0
(transparent
black).
See also:
HeightmapLayer.TextureCreates a new instance of HeightmapSample.
public
constructor
|
HeightmapSample
(int32 elevation,
int64 texture = 0,
int64 material = 0,
int32 coverage = MaxValue30,
int32 displacement = 0)
|
||
params
|
elevation
|
The Elevation value. | |
texture
|
The
Texture
value.
Defaults
to
0 . |
||
material
|
The
Material
value.
Defaults
to
0 . |
||
coverage
|
The Coverage value. Defaults to MaxValue30. | ||
displacement
|
The
Displacement
value.
Defaults
to
0 .
|
Clears the given heightmap layers to Default.
public
method
|
ClearDefault
(HeightmapLayer layers)
|
||
type
|
HeightmapSample
|
||
params
|
layers
|
The heightmap layers to clear. | |
returns
|
The resulting heightmap sample value. |
Clears the given heightmap layers to Void.
public
method
|
ClearVoid
(HeightmapLayer layers)
|
||
type
|
HeightmapSample
|
||
params
|
layers
|
The heightmap layers to clear. | |
returns
|
The resulting heightmap sample value. |
public
method
|
Equals
(HeightmapSample other)
|
||
type
|
bool
|
||
params
|
other
|
Merges this heightmap sample (first) with the given one (second).
public
method
|
Merge
(HeightmapSample other,
HeightmapLayer layers = HeightmapLayer.All)
|
||
type
|
HeightmapSample
|
||
params
|
other
|
The heightmap sample to merge with. | |
layers
|
The heightmap layers to merge; defaults to All. | ||
returns
|
The resulting heightmap sample. |
Mixes this heightmap sample with the given one.
public
method
|
Mix
(HeightmapSample other,
int32 f)
|
||
type
|
HeightmapSample
|
||
params
|
other
|
The heightmap sample to mix with.. | |
f
|
Mix
factor
for
heightmap
samples
in
the
range
[0..65536]
(0
=
this
sample,
65536
=
other
sample).
|
||
returns
|
The resulting heightmap sample. |
Remarks:
This method uses discrete linear interpolation.
Mixes the given heightmap samples (interpolation between b and c).
public
static
method
|
Mix
(HeightmapSample a,
HeightmapSample b,
HeightmapSample c,
HeightmapSample d,
int32 f)
|
||
type
|
HeightmapSample
|
||
params
|
a
|
The zeroth heightmap sample to mix. | |
b
|
The first heightmap sample to mix. | ||
c
|
The second heightmap sample to mix. | ||
d
|
The third heightmap sample to mix. | ||
f
|
Mix
factor
for
the
heightmap
samples
in
the
range
[0..65536] .
|
||
returns
|
The resulting heightmap sample. |
Remarks:
This method uses discrete Catmull-Rom interpolation.
Modulates this heightmap sample with the given coverage.
public
method
|
Modulate
(int32 coverage)
|
||
type
|
HeightmapSample
|
||
params
|
coverage
|
The coverage sample to modulate with. |
Sets the Displacement value.
public
method
|
SetDisplacement
(int32 displacement)
|
||
type
|
HeightmapSample
|
||
params
|
displacement
|
The displacement value. | |
returns
|
The resulting heightmap sample. |
Sets the Elevation value.
public
method
|
SetElevation
(int32 elevation)
|
||
type
|
HeightmapSample
|
||
params
|
elevation
|
The elevation value. | |
returns
|
The resulting heightmap sample. |
Sets the Material value.
public
method
|
SetMaterial
(int64 material)
|
||
type
|
HeightmapSample
|
||
params
|
material
|
The material value. | |
returns
|
The resulting heightmap sample. |
Sets the Texture value.
public
method
|
SetTexture
(int64 texture)
|
||
type
|
HeightmapSample
|
||
params
|
texture
|
The texture value. | |
returns
|
The resulting heightmap sample. |