QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
Public Member Functions | List of all members
QgsPointCloud3DRenderContext Class Reference

Encapsulates the render context for a 3D point cloud rendering operation. More...

#include <qgspointcloudlayer3drenderer.h>

Inheritance diagram for QgsPointCloud3DRenderContext:
Inheritance graph
[legend]

Public Member Functions

 QgsPointCloud3DRenderContext (const Qgs3DMapSettings &map, const QgsCoordinateTransform &coordinateTransform, std::unique_ptr< QgsPointCloud3DSymbol > symbol, double zValueScale, double zValueFixedOffset)
 Constructor for QgsPointCloud3DRenderContext. More...
 
 QgsPointCloud3DRenderContext (const QgsPointCloud3DRenderContext &rh)=delete
 QgsPointCloudRenderContext cannot be copied. More...
 
QgsPointCloudAttributeCollection attributes () const
 Returns the attributes associated with the rendered block. More...
 
void cancelRendering () const
 Cancels rendering. More...
 
QgsCoordinateTransform coordinateTransform () const
 Returns the coordinate transform used to transform points from layer CRS to the map CRS. More...
 
QgsFeedbackfeedback () const
 Returns the feedback object used to cancel rendering and check if rendering was canceled. More...
 
template<typename T >
void getAttribute (const char *data, std::size_t offset, QgsPointCloudAttribute::DataType type, T &value) const
 Retrieves the attribute value from data at the specified offset, where type indicates the original data type for the attribute. More...
 
QSet< int > getFilteredOutValues () const
 Returns a set containing the filtered out values. More...
 
bool isCanceled () const
 Returns true if the rendering is canceled. More...
 
QgsPointCloud3DRenderContextoperator= (const QgsPointCloud3DRenderContext &)=delete
 QgsPointCloudRenderContext cannot be copied. More...
 
void setAttributes (const QgsPointCloudAttributeCollection &attributes)
 Sets the attributes associated with the rendered block. More...
 
void setCoordinateTransform (const QgsCoordinateTransform &coordinateTransform)
 Sets the coordinate transform used to transform points from layer CRS to the map CRS. More...
 
void setFilteredOutCategories (const QgsPointCloudCategoryList &categories)
 Sets the list of categories of the classification that won't be rendered. More...
 
void setSymbol (QgsPointCloud3DSymbol *symbol)
 Sets the symbol used for rendering the point cloud Takes ownership over the passed symbol. More...
 
QgsPointCloud3DSymbolsymbol () const
 Returns the symbol used for rendering the point cloud. More...
 
double zValueFixedOffset () const
 Returns any constant offset which must be applied to z values taken from the point cloud index. More...
 
double zValueScale () const
 Returns any constant scaling factor which must be applied to z values taken from the point cloud index. More...
 

Detailed Description

Encapsulates the render context for a 3D point cloud rendering operation.

Since
QGIS 3.18

Definition at line 42 of file qgspointcloudlayer3drenderer.h.

Constructor & Destructor Documentation

◆ QgsPointCloud3DRenderContext() [1/2]

QgsPointCloud3DRenderContext::QgsPointCloud3DRenderContext ( const Qgs3DMapSettings map,
const QgsCoordinateTransform coordinateTransform,
std::unique_ptr< QgsPointCloud3DSymbol symbol,
double  zValueScale,
double  zValueFixedOffset 
)

Constructor for QgsPointCloud3DRenderContext.

The zValueScale argument specifies any constant scaling factor which must be applied to z values taken from the point cloud index.

The zValueFixedOffset argument specifies any constant offset value which must be added to z values taken from the point cloud index.

Definition at line 30 of file qgspointcloudlayer3drenderer.cpp.

◆ QgsPointCloud3DRenderContext() [2/2]

QgsPointCloud3DRenderContext::QgsPointCloud3DRenderContext ( const QgsPointCloud3DRenderContext rh)
delete

QgsPointCloudRenderContext cannot be copied.

Member Function Documentation

◆ attributes()

QgsPointCloudAttributeCollection QgsPointCloud3DRenderContext::attributes ( ) const
inline

Returns the attributes associated with the rendered block.

See also
setAttributes()

Definition at line 69 of file qgspointcloudlayer3drenderer.h.

◆ cancelRendering()

void QgsPointCloud3DRenderContext::cancelRendering ( ) const

Cancels rendering.

See also
isCanceled()

Definition at line 73 of file qgspointcloudlayer3drenderer.cpp.

◆ coordinateTransform()

QgsCoordinateTransform QgsPointCloud3DRenderContext::coordinateTransform ( ) const
inline

Returns the coordinate transform used to transform points from layer CRS to the map CRS.

Definition at line 185 of file qgspointcloudlayer3drenderer.h.

◆ feedback()

QgsFeedback * QgsPointCloud3DRenderContext::feedback ( ) const
inline

Returns the feedback object used to cancel rendering and check if rendering was canceled.

Definition at line 190 of file qgspointcloudlayer3drenderer.h.

◆ getAttribute()

template<typename T >
void QgsPointCloud3DRenderContext::getAttribute ( const char *  data,
std::size_t  offset,
QgsPointCloudAttribute::DataType  type,
T &  value 
) const
inline

Retrieves the attribute value from data at the specified offset, where type indicates the original data type for the attribute.

Definition at line 109 of file qgspointcloudlayer3drenderer.h.

◆ getFilteredOutValues()

QSet< int > QgsPointCloud3DRenderContext::getFilteredOutValues ( ) const

Returns a set containing the filtered out values.

See also
setFilteredOutCategories()

Definition at line 55 of file qgspointcloudlayer3drenderer.cpp.

◆ isCanceled()

bool QgsPointCloud3DRenderContext::isCanceled ( ) const

Returns true if the rendering is canceled.

Definition at line 68 of file qgspointcloudlayer3drenderer.cpp.

◆ operator=()

QgsPointCloud3DRenderContext & QgsPointCloud3DRenderContext::operator= ( const QgsPointCloud3DRenderContext )
delete

QgsPointCloudRenderContext cannot be copied.

◆ setAttributes()

void QgsPointCloud3DRenderContext::setAttributes ( const QgsPointCloudAttributeCollection attributes)

Sets the attributes associated with the rendered block.

See also
attributes()

Definition at line 40 of file qgspointcloudlayer3drenderer.cpp.

◆ setCoordinateTransform()

void QgsPointCloud3DRenderContext::setCoordinateTransform ( const QgsCoordinateTransform coordinateTransform)

Sets the coordinate transform used to transform points from layer CRS to the map CRS.

Definition at line 63 of file qgspointcloudlayer3drenderer.cpp.

◆ setFilteredOutCategories()

void QgsPointCloud3DRenderContext::setFilteredOutCategories ( const QgsPointCloudCategoryList categories)

Sets the list of categories of the classification that won't be rendered.

See also
getFilteredOutValues()

Definition at line 50 of file qgspointcloudlayer3drenderer.cpp.

◆ setSymbol()

void QgsPointCloud3DRenderContext::setSymbol ( QgsPointCloud3DSymbol symbol)

Sets the symbol used for rendering the point cloud Takes ownership over the passed symbol.

See also
symbol()

Definition at line 45 of file qgspointcloudlayer3drenderer.cpp.

◆ symbol()

QgsPointCloud3DSymbol * QgsPointCloud3DRenderContext::symbol ( ) const
inline

Returns the symbol used for rendering the point cloud.

See also
setSymbol()

Definition at line 83 of file qgspointcloudlayer3drenderer.h.

◆ zValueFixedOffset()

double QgsPointCloud3DRenderContext::zValueFixedOffset ( ) const
inline

Returns any constant offset which must be applied to z values taken from the point cloud index.

Note
Scaling of z values via zValueScale() should be applied before the zValueFixedOffset().

Definition at line 164 of file qgspointcloudlayer3drenderer.h.

◆ zValueScale()

double QgsPointCloud3DRenderContext::zValueScale ( ) const
inline

Returns any constant scaling factor which must be applied to z values taken from the point cloud index.

Note
Scaling of z values should be applied before the zValueFixedOffset().

Definition at line 157 of file qgspointcloudlayer3drenderer.h.


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