Wraps input and output buffers for pixel layers.
sealed class
|
PixelLayerBuffers
|
extends
|
BrushBuffers
|
See also:
IPixelLayerThe heightmap region buffer.
public
readonly
field
|
Heightmap
|
||
type
|
HeightmapRegion
|
||
inherited
|
BrushBuffers.Heightmap
|
Returns the normal buffer.
public
property
|
Normals
{
get
}
|
||
type
|
NormalBuffer
|
||
value
|
|
The computed normal buffer. | |
inherited
|
BrushBuffers.Normals
|
Remarks:
The normal buffer is (re-)computed after HeightmapDirty has been called with Elevation or when the value of Step is modified.
See also:
BrushBuffers.HeightmapDirtyThe output pixel buffer.
public
readonly
field
|
Pixels
|
||
type
|
ColorBuffer
|
Returns the slope buffer.
public
property
|
Slopes
{
get
}
|
||
type
|
SlopeBuffer
|
||
value
|
|
The computed slope buffer. | |
inherited
|
BrushBuffers.Slopes
|
Remarks:
The normal buffer is (re-)computed after HeightmapDirty has been called with Elevation or when the value of Step is modified.
See also:
BrushBuffers.HeightmapDirtyThe sample step distance of the input data.
public
property
|
Step
{
get
set
}
|
||
type
|
int32
|
||
value
|
|
The sample step value. | |
inherited
|
BrushBuffers.Step
|
Remarks:
Defaults
to
1
.
Creates a new instance of PixelLayerBuffers.
public
constructor
|
PixelLayerBuffers
(HeightmapRegion heightmap,
ColorBuffer pixels = null)
|
||
params
|
heightmap
|
[not-null]
|
The input heightmap region buffer. |
pixels
|
The
output
pixel
buffer.
If
null ,
a
new
buffer
will
be
created.
Defaults
to
null .
|
Creates a new instance of IObjectPoolFactory that creates PixelLayerBuffers objects.
public
static
method
|
Pool
(int32 width,
int32 height,
HeightmapLayer layers)
|
||
type
|
IObjectPoolFactory<PixelLayerBuffers>
|
||
params
|
width
|
[>0]
|
The buffer width, in pixels. |
height
|
[>0]
|
The buffer height, in pixels. | |
layers
|
The heightmap layers. | ||
returns
|
|
The object pool factory. |
Remarks:
The following values will be reset when a PixelLayerBuffers object is fetched from the pool:
The buffer contents are undefined.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. | |
inherited
|
BrushBuffers.HeightmapDirty
|
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:
BrushBuffers.Normals