PaintingBuffer
Description
Helper object that allows reusing of buffers when performing painting with heightmap data.
Public / Constructors
PaintingBuffer
2 overloads
Creates a new instance of PaintingBuffer.
A new input buffer will be created according to the given parameters.
Creates a new instance of PaintingBuffer.
The given input buffer will be wrapped by this object.
Pool
Creates a new instance of IObjectPoolFactory that creates PaintingBuffer objects.
The following values will be reset when a PaintingBuffer object is fetched from the pool:
The buffer contents are undefined.
Public / Methods
Public / Attributes
Coords
The heightmap coordinates that correspond to the top-left sample in the heightmap region buffer (see Samples).
This value only needs to be set when computing terrain-space normal vectors (see Geometry). Defaults to CubemapFaceCoordsI.Undefined.
Geometry
The geometry to use for computing terrain-space normal vectors.
When computing terrain-space normal vectors, the Coords property must be set before calling IPixelLayer.ComputeLayerPixels.
- See also
Modifier
Optional mesh modifier to use when computing terrain-space normal vectors.
The value of this property will be ignored if Geometry is null
.
Normals
Returns the normal buffer.
The normal buffer contains tangent-space normal vectors iff Geometry is null
. Otherwise, it contains terrain-space normal vectors.
Using the normal buffer requires HeightmapLayer.Elevation as input layer.
All layers declared by the used mesh modifier (see Modifier) are required as input layers.
The normal buffer is (re-)computed after SamplesDirty has been called with HeightmapLayer.Elevation or when the value of Step is modified.
- See also
Slopes
Returns the slope buffer.
Using the slope buffer requires HeightmapLayer.Elevation as input layer.
The normal buffer is (re-)computed after SamplesDirty has been called with HeightmapLayer.Elevation or when the value of Step is modified.
- See also