interface
|
IBrush
|
extends
|
IHeightmapLayers
|
||
base of
|
Brush
|
Returns the brush height.
property
|
Height
{
get
}
|
||
type
|
int32
|
||
value
|
|
The brush height, in samples. |
The mask of heightmap layers this object uses.
property
|
LayerMask
{
get
}
|
||
type
|
HeightmapLayer
|
||
value
|
Bitwise combination of HeightmapLayer values. | ||
inherited
|
IHeightmapLayers.LayerMask
|
Remarks:
These heightmap layers store actual terrain data:
Missing data is represented with the Coverage layer. It describes how much information is present in a stored heightmap sample. The semantics of coverage with heightmap samples is the same as premultiplied alpha with texture samples. A LayerMask without Coverage means that all samples are fully solid. If a LayerMask contains the Coverage layer but no others, the coverage values are used to represent 'holes' in the terrain (e.g. creating holes for caves, tunnels, etc.).
Returns the brush width.
property
|
Width
{
get
}
|
||
type
|
int32
|
||
value
|
|
The brush width, in samples. |
Applies this heightmap brush to the given heightmap samples.
[ThreadSafe]
|
||||
method
|
Apply
(CubemapFaceRect region,
HeightmapRegion samples,
HeightmapLayer layers,
object userData)
|
|||
params
|
region
|
The heightmap region of samples. | ||
samples
|
The heightmap samples to update. | |||
layers
|
The heightmap layers to process. | |||
userData
|
Optional user data object that has been passed to UpdateRegion. |
Remarks:
In order to apply an IBrush object to an IHeightmap, call the UpdateRegion method and pass this method as the HeightmapRegionDelegate.
See also:
IHeightmap.UpdateRegionTransforms the samples in this brush before applying them to the target heightmap.
method
|
ApplyCoordinateTransform
(Transform transform)
|
||
type
|
IBrush
|
||
params
|
transform
|
The transform to apply to this brush before updating the heightmap. | |
returns
|
|
The resulting brush. |
Multiplies the denormalized elevation values in this brush with the given factor before applying them to the target heightmap.
method
|
ApplyElevationScale
(float32 scale)
|
||
type
|
IBrush
|
||
params
|
scale
|
The scale factor. | |
returns
|
|
The resulting brush. |
Remarks:
The vertical range of the buffer samples (see Vertical) are used to denormalized elevation values.
Applies the given brush mask to this brush, replacing any other masks that have been applied earlier.
method
|
Mask
(IBrushMask mask,
IHeightmap heightmap = null)
|
||
type
|
IBrush
|
||
params
|
mask
|
The
brush
mask
to
apply
or
null
to
clear
the
mask. |
|
heightmap
|
The
heightmap
from
which
to
get
the
samples
for
computing
the
brush
mask.
Will
be
ignored
if
mask
is
null .
If
null ,
the
original
heightmap
samples
from
the
brush
will
be
used.
Defaults
to
null .
|
||
returns
|
|
The resulting brush. |