Helper object that allows reusing of buffers when applying brushes to heightmaps.
class
|
BrushBuffers
|
base of
|
PixelLayerBuffers
|
A
brush
is
applied
to
a
heightmap
by
passing
its
Apply
method
to
the
combine
parameter
of
the
UpdateRegion
method.
To
avoid
temporary
buffers
being
created
repeatedly,
an
instance
of
BrushBuffers
can
be
passed
to
the
userData
parameter
for
each
updated
region.
See also:
IBrushThe heightmap region buffer.
public
readonly
field
|
Heightmap
|
||
type
|
HeightmapRegion
|
Returns the normal buffer.
public
property
|
Normals
{
get
}
|
||
type
|
NormalBuffer
|
||
value
|
|
The computed normal buffer. |
Remarks:
The normal buffer is (re-)computed after HeightmapDirty has been called with Elevation or when the value of Step is modified.
See also:
HeightmapDirtyReturns the slope buffer.
public
property
|
Slopes
{
get
}
|
||
type
|
SlopeBuffer
|
||
value
|
|
The computed slope buffer. |
Remarks:
The normal buffer is (re-)computed after HeightmapDirty has been called with Elevation or when the value of Step is modified.
See also:
HeightmapDirtyThe sample step distance of the input data.
public
property
|
Step
{
get
set
}
|
||
type
|
int32
|
||
value
|
|
The sample step value. |
Remarks:
Defaults
to
1
.
Creates a new instance of BrushBuffers.
public
constructor
|
BrushBuffers
(HeightmapRegion heightmap)
|
||
params
|
heightmap
|
[not-null]
|
The heightmap region buffer. |
Marks the given layers of Heightmap as dirty.
public
method
|
HeightmapDirty
(HeightmapLayer layers = HeightmapLayer.All)
|
||
params
|
layers
|
The heightmap layers to mark as dirty. Defaults to All. |
Remarks:
This method needs to be called after the samples of Heightmap have been modified, to make sure that dependent computations will be performed again.
See also:
Normals