Abstract base class for IPixelLayer implementations.
abstract class
|
PixelLayer
|
implements
|
IPixelLayer
|
The configurator object for this type.
public
static
property
|
Config
{
get
}
|
||
type
|
IConfigurator<IPixelLayer>
|
||
value
|
|
The configurator object. |
Returns the configuration value that describes this object.
public
virtual
method
|
ToConfig
()
|
||
type
|
ConfigValue
|
||
returns
|
|
The configuration value. | |
implements
|
IConfigurable.ToConfig
|
Remarks:
All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.
The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.
Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.
The mask of heightmap layers this object uses.
public
abstract
property
|
LayerMask
{
get
}
|
||
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.).
The amount of padding pixels this layer requires.
public
abstract
property
|
Padding
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of padding pixels. | |
implements
|
IPixelLayer.Padding
|
Creates a pixel layer that renders the coverage layer (see Coverage) into Pixels.
public
static
method
|
Coverage
(IColorRamp colorRamp = null,
bool adjustRange = false)
|
||
type
|
IPixelLayer
|
||
params
|
colorRamp
|
The
color
ramp
to
use.
If
null ,
a
default
black/white
color
ramp
will
be
used.
Defaults
to
null .
|
|
adjustRange
|
Transform
the
given
colorRamp
to
the
input
range
[0..1]?
Defaults
to
false .
|
||
returns
|
|
The pixel layer. |
Creates a default pixel layer for the given heightmap.
public
static
method
|
Default
(IHeightmap heightmap,
bool lit = true)
|
||
type
|
IPixelLayer
|
||
params
|
heightmap
|
[not-null]
|
The heightmap. |
lit
|
Use
baked
lighting?
Defaults
to
true . |
||
returns
|
|
The default pixel layer. |
Creates a pixel layer that reads Displacement samples, applies a color-ramp to them and stores the resulting pixels in Pixels.
public
static
method
|
Displacement
(IColorRamp colorRamp = null,
bool adjustRange = false)
|
||
type
|
IPixelLayer
|
||
params
|
colorRamp
|
The
colors
to
use.
If
null ,
a
simple
black/white
ramp
is
used.
Defaults
to
null .
|
|
adjustRange
|
Transform
the
given
colorRamp
to
the
vertical
range
(see
Vertical)?
Defaults
to
false .
|
||
returns
|
|
The pixel layer. |
Creates a pixel layer that reads Elevation samples, applies a color-ramp to them and stores the resulting pixels in Pixels.
public
static
method
|
Elevation
(IColorRamp colorRamp = null,
bool adjustRange = false)
|
||
type
|
IPixelLayer
|
||
params
|
colorRamp
|
The
colors
to
use.
The
color
ramp
input
coordinates
are
terrain-space
elevation
values
in
metres.
If
null ,
a
simple
black/white
ramp
is
used.
Defaults
to
null .
|
|
adjustRange
|
Transform
the
given
colorRamp
to
the
vertical
range
(see
Vertical)?
Defaults
to
false .
|
||
returns
|
|
The pixel layer. |
Creates a pixel layer that renders the material layer (see Material) into Pixels, using the given material color keys.
public
static
method
|
Material
(MaterialKeys materials)
|
||
type
|
IPixelLayer
|
||
params
|
materials
|
[not-null]
|
The material keys to use. |
returns
|
|
The pixel layer. |
See also:
MaterialTokenCreates a pixel layer that renders the given materials of the material layer (see Material) into Pixels.
public
static
method
|
Material
(int32 materialRed = 0,
int32 materialGreen = 1,
int32 materialBlue = 2,
int32 materialAlpha = 3)
|
||
type
|
IPixelLayer
|
||
params
|
materialRed
|
ID
of
material
which
weight
to
encode
in
the
Red
channel.
Defaults
to
0 .
|
|
materialGreen
|
ID
of
material
which
weight
to
encode
in
the
Green
channel.
Defaults
to
1 .
|
||
materialBlue
|
ID
of
material
which
weight
to
encode
in
the
Blue
channel.
Defaults
to
2 .
|
||
materialAlpha
|
ID
of
material
which
inverse
weight
to
encode
in
the
Alpha
channel.
Defaults
to
3 .
|
See also:
MaterialTokenRenders normal vectors (see Normals) into Pixels.
public
static
method
|
Normals
()
|
||
type
|
IPixelLayer
|
||
returns
|
|
The resulting pixel layer. |
Renders slope angles (see Slopes) into Pixels.
public
static
method
|
Slopes
(IColorRamp colors = null)
|
||
type
|
IPixelLayer
|
||
params
|
colors
|
The colors to use. Slope values (between 0° and 90°) are passed to the color ramp. | |
returns
|
|
The resulting pixel layer. |
Creates
a
pixel
layer
that
copies
the
texture
layer
(if
materials
is
null
)
to
Pixels
or
renders
the
material
layer
using
the
given
material
color-keys.
public
static
method
|
Texture
(MaterialKeys materials = null)
|
||
type
|
IPixelLayer
|
||
params
|
materials
|
The
material
keys
or
null . |
|
returns
|
|
The pixel layer. |
Returns a pixel layer that initializes all pixels in Pixels to the given color.
public
static
method
|
Uniform
(int64 color = ~0)
|
||
type
|
IPixelLayer
|
||
params
|
color
|
The color to clear to. Defaults to White. | |
returns
|
|
The pixel layer. |
Computes the pixels of this layer using the given buffers.
public
abstract
method
|
ComputeLayerPixels
(PixelLayerBuffers buffers)
|
||
params
|
buffers
|
[not-null]
|
The pixel layer buffers. |
implements
|
IPixelLayer.ComputeLayerPixels
|
Applies a lambertian lighting term to the target pixels in Pixels.
public
virtual
method
|
LightAmbient
(int64 lightColor)
|
||
type
|
IPixelLayer
|
||
params
|
lightColor
|
The ambient light color (the alpha channel is ignored). | |
returns
|
|
The resulting pixel layer. | |
implements
|
IPixelLayerOps.LightAmbient
|
See also:
ColorsApplies a lambertian lighting term to the target pixels in Pixels.
public
virtual
method
|
LightDirectional
(Vec3F lightDirection,
int64 lightColor)
|
||
type
|
IPixelLayer
|
||
params
|
lightDirection
|
The light direction vector. | |
lightColor
|
The directional light color (the alpha channel is ignored). | ||
returns
|
|
The resulting pixel layer. | |
implements
|
IPixelLayerOps.LightDirectional
|
Remarks:
The X and Y refer to pixel coordinates, Z is pointing downwards.
See also:
Colors