The heightmap painter paints brushes onto heightmaps using background tasks.
sealed class
|
HeightmapPainter
|
extends
|
Disposable
|
||
implements
|
IHeightmapLayers
|
The mask of heightmap layers this object uses.
public
property
|
LayerMask
{
get
set
}
|
||
type
|
HeightmapLayer
|
||
value
|
Bitwise combination of HeightmapLayer values. | ||
implements
|
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 lifecycle state of this object.
public
virtual
property
|
LifecycleState
{
get
}
|
||
type
|
LifecycleState
|
||
value
|
The lifecycle state. | ||
inherited
|
Disposable.LifecycleState
|
Creates a new instance of HeightmapPainter.
public
constructor
|
HeightmapPainter
()
|
Acquires a strong reference to this disposable object.
[OwnerReturn, ThreadSafe]
|
||||
public
method
|
AcquireTry
()
|
|||
type
|
IDisposable
|
|||
returns
|
this
if
a
new
strong
reference
has
been
acquired,
null
if
this
object
is
already
being
disposed.
|
|||
inherited
|
Disposable.AcquireTry
|
Remarks:
The object will not be actually disposed by calls to Dispose when there is at least one strong reference left. Code that calls the AcquireTry method is responsible for calling the Dispose method accordingly.
This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.
Applies the given brush to the specified heightmap, without tracking the background task.
public
method
|
ApplyBrush
(IBrush brush,
IHeightmap heightmap,
CubemapFaceRect region)
|
||
params
|
brush
|
[not-null]
|
The brush to apply. |
heightmap
|
[not-null]
|
The heightmap to update. | |
region
|
The target region. |
Remarks:
The current LayerMask will be used for the paint job.
Applies the given brush to the specified heightmap.
public
method
|
ApplyBrushJoin
(IBrush brush,
IHeightmap heightmap,
CubemapFaceRect region)
|
||
type
|
TaskResultVoid
|
||
params
|
brush
|
[not-null]
|
The brush to apply. |
heightmap
|
[not-null]
|
The heightmap to update. | |
region
|
The target region. | ||
returns
|
|
The background task. The caller is responsible for properly finishing the task (see Finish. |
Remarks:
The current LayerMask will be used for the paint job.
Releases all resources held by this object if there are no more strong references to it, decrements the reference counter by one otherwise.
[Dispose, OwnerThis, ThreadSafe]
|
||||
public
method
|
Dispose
()
|
|||
inherited
|
Disposable.Dispose
|
Remarks:
The Dispose method silently returns if the object has already been disposed.