When building a raster layer, you can provide hints about the interaction expected between the application user and the layer.
You can assign a layer type to LuciadCPillar raster layers according to the expected level of interaction:
-
Background
Background
Background
layers: the application user rarely or never modifies these layers. -
Interactive
Interactive
Interactive
layers: the application user may frequently manipulate these layers.
auto rasterLayer = RasterLayer::newBuilder().model(rasterModel).layerType(RasterLayerType::Interactive).build();
RasterLayer layer = RasterLayer.NewBuilder().Model(rasterModel).LayerType(RasterLayerType.Interactive).Build();
RasterLayer layer = RasterLayer.newBuilder().model(rasterModel).layerType(RasterLayerType.Interactive).build();
If you build a raster layer without specifying its type, LuciadCPillar treats it as a Background
Background
Background
layer by default.
Background layer features
By setting a raster layer as a Background
Background
Background
layer, you indicate that it contains static data which is rarely or never modified.
This setting causes LuciadCPillar to perform certain optimizations, such as better RAM and GPU memory management and better
CPU load sharing between the render thread and background threads.
However, changes to a background layer’s visibility, its position in the view’s layer hierarchy, or its styling may lead to
a significant performance cost.
Setting a raster layer as a Background
Background
Background
layer also affects the default layer ordering:
if you add a Background
Background
Background
layer to the layer list without specifying its position, LuciadCPillar goes through the layer list starting from the top,
and places it just above the first Background
Background
Background
layer it encounters.
Therefore, Background
Background
Background
layers typically have a position near the bottom of the layer list.
Background
Background
Background
layers are treated as such as long
as there are no Interactive
Interactive
Interactive
layers or non-raster layers below them in the layer list.
Otherwise, Background
Background
Background
layers are treated as if they were Interactive
Interactive
Interactive
layers.
|
Interactive layer features
By setting a raster layer as Interactive
Interactive
Interactive
, you indicate
that the layer visualization algorithm must optimize its performance for interactive layer manipulation by the user.
Examples of such interactive layer manipulations are layer visibility changes,
or layer styles
styles
styles
changes through interactive UI controls.
Keep in mind that GPU memory consumption and computational load on the render thread increase as the number of Interactive
Interactive
Interactive
layers in the layer list increases.