QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsPointCloudLayerRenderer Class Reference

Implementation of threaded rendering for point cloud layers. More...

#include <qgspointcloudlayerrenderer.h>

Inheritance diagram for QgsPointCloudLayerRenderer:
Inheritance graph
[legend]

Public Member Functions

 QgsPointCloudLayerRenderer (QgsPointCloudLayer *layer, QgsRenderContext &context)
 Ctor.
 
 ~QgsPointCloudLayerRenderer ()
 
QgsFeedbackfeedback () const override
 Access to feedback object of the layer renderer (may be nullptr)
 
Qgis::MapLayerRendererFlags flags () const override
 Returns flags which control how the map layer rendering behaves.
 
bool forceRasterRender () const override
 Returns true if the renderer must be rendered to a raster paint device (e.g.
 
bool render () override
 Do the rendering (based on data stored in the class).
 
void setLayerRenderingTimeHint (int time) override
 Sets approximate render time (in ms) for the layer to render.
 
- Public Member Functions inherited from QgsMapLayerRenderer
 QgsMapLayerRenderer (const QString &layerID, QgsRenderContext *context=nullptr)
 Constructor for QgsMapLayerRenderer, with the associated layerID and render context.
 
virtual ~QgsMapLayerRenderer ()
 
QStringList errors () const
 Returns list of errors (problems) that happened during the rendering.
 
bool isReadyToCompose () const
 Returns whether the renderer has already drawn (at least partially) some data.
 
QString layerId () const
 Gets access to the ID of the layer rendered by this class.
 
QgsRenderContextrenderContext ()
 Returns the render context associated with the renderer.
 
const QgsRenderContextrenderContext () const
 Returns the render context associated with the renderer.
 
QList< QgsRenderedItemDetails * > takeRenderedItemDetails ()
 Takes the list of rendered item details from the renderer.
 

Additional Inherited Members

- Protected Member Functions inherited from QgsMapLayerRenderer
void appendRenderedItemDetails (QgsRenderedItemDetails *details)
 Appends the details of a rendered item to the renderer.
 
- Protected Attributes inherited from QgsMapLayerRenderer
QStringList mErrors
 
QString mLayerID
 
bool mReadyToCompose = true
 The flag must be set to false in renderer's constructor if wants to use the smarter map redraws functionality https://github.com/qgis/QGIS-Enhancement-Proposals/issues/181.
 
- Static Protected Attributes inherited from QgsMapLayerRenderer
static constexpr int MAX_TIME_TO_USE_CACHED_PREVIEW_IMAGE = 3000
 Maximum time (in ms) to allow display of a previously cached preview image while rendering layers, before switching to a progressive rendering display.
 

Detailed Description

Implementation of threaded rendering for point cloud layers.

Note
The API is considered EXPERIMENTAL and can be changed without a notice
Not available in Python bindings
Since
QGIS 3.18

Definition at line 59 of file qgspointcloudlayerrenderer.h.

Constructor & Destructor Documentation

◆ QgsPointCloudLayerRenderer()

QgsPointCloudLayerRenderer::QgsPointCloudLayerRenderer ( QgsPointCloudLayer layer,
QgsRenderContext context 
)
explicit

Ctor.

Definition at line 43 of file qgspointcloudlayerrenderer.cpp.

◆ ~QgsPointCloudLayerRenderer()

QgsPointCloudLayerRenderer::~QgsPointCloudLayerRenderer ( )
default

Member Function Documentation

◆ feedback()

QgsFeedback * QgsPointCloudLayerRenderer::feedback ( ) const
inlineoverridevirtual

Access to feedback object of the layer renderer (may be nullptr)

Reimplemented from QgsMapLayerRenderer.

Definition at line 72 of file qgspointcloudlayerrenderer.h.

◆ flags()

Qgis::MapLayerRendererFlags QgsPointCloudLayerRenderer::flags ( ) const
overridevirtual

Returns flags which control how the map layer rendering behaves.

Since
QGIS 3.34

Reimplemented from QgsMapLayerRenderer.

Definition at line 738 of file qgspointcloudlayerrenderer.cpp.

◆ forceRasterRender()

bool QgsPointCloudLayerRenderer::forceRasterRender ( ) const
overridevirtual

Returns true if the renderer must be rendered to a raster paint device (e.g.

QImage).

Some layer settings require layers to be effectively "flattened" while rendering maps, which is achieved by first rendering the layer onto a raster paint device and then compositing the resultant image onto the final map render.

E.g. if a layer contains features with transparency or alternative blending modes, and the effects of these opacity or blending modes should be restricted to only affect other features within the SAME layer, then a flattened raster based render is required.

Subclasses should return true whenever their corresponding layer settings require the layer to always be rendered using a raster paint device.

Since
QGIS 3.18

Reimplemented from QgsMapLayerRenderer.

Definition at line 749 of file qgspointcloudlayerrenderer.cpp.

◆ render()

bool QgsPointCloudLayerRenderer::render ( )
overridevirtual

Do the rendering (based on data stored in the class).

Returns true if the layer was completely rendered successfully (i.e. the render was not canceled early).

Implements QgsMapLayerRenderer.

Definition at line 85 of file qgspointcloudlayerrenderer.cpp.

◆ setLayerRenderingTimeHint()

void QgsPointCloudLayerRenderer::setLayerRenderingTimeHint ( int  time)
overridevirtual

Sets approximate render time (in ms) for the layer to render.

This can be used to specifies a hint at the expected render times for the layer, so that the individual layer renderer subclasses can apply heuristics and determine appropriate update intervals during the render operation.

Note
Not available in Python bindings.
Since
QGIS 3.18

Reimplemented from QgsMapLayerRenderer.

Definition at line 756 of file qgspointcloudlayerrenderer.cpp.


The documentation for this class was generated from the following files: