QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
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 Qgs3DRenderContext &context, const QgsCoordinateTransform &coordinateTransform, std::unique_ptr< QgsPointCloud3DSymbol > symbol, double zValueScale, double zValueFixedOffset)
 Constructor for QgsPointCloud3DRenderContext.
 
 QgsPointCloud3DRenderContext (const QgsPointCloud3DRenderContext &rh)=delete
 
QgsPointCloudAttributeCollection attributes () const
 Returns the attributes associated with the rendered block.
 
void cancelRendering () const
 Cancels rendering.
 
QgsCoordinateTransform coordinateTransform () const
 Returns the coordinate transform used to transform points from layer CRS to the map CRS.
 
QgsFeedbackfeedback () const
 Returns the feedback object used to cancel rendering and check if rendering was canceled.
 
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.
 
QSet< int > getFilteredOutValues () const
 Returns a set containing the filtered out values.
 
bool isCanceled () const
 Returns true if the rendering is canceled.
 
QgsRectangle layerExtent () const
 Returns the 3D scene's extent in layer crs.
 
QgsPointCloud3DRenderContextoperator= (const QgsPointCloud3DRenderContext &)=delete
 
void setAttributes (const QgsPointCloudAttributeCollection &attributes)
 Sets the attributes associated with the rendered block.
 
void setCoordinateTransform (const QgsCoordinateTransform &coordinateTransform)
 Sets the coordinate transform used to transform points from layer CRS to the map CRS.
 
void setFilteredOutCategories (const QgsPointCloudCategoryList &categories)
 Sets the list of categories of the classification that won't be rendered.
 
void setSymbol (QgsPointCloud3DSymbol *symbol)
 Sets the symbol used for rendering the point cloud Takes ownership over the passed symbol.
 
QgsPointCloud3DSymbolsymbol () const
 Returns the symbol used for rendering the point cloud.
 
double zValueFixedOffset () const
 Returns any constant offset which must be applied to z values taken from the point cloud index.
 
double zValueScale () const
 Returns any constant scaling factor which must be applied to z values taken from the point cloud index.
 
- Public Member Functions inherited from Qgs3DRenderContext
 Qgs3DRenderContext ()=default
 
QgsCoordinateReferenceSystem crs () const
 Returns the coordinate reference system used in the 3D scene.
 
QgsExpressionContextexpressionContext ()
 Gets the expression context.
 
const QgsExpressionContextexpressionContext () const
 Gets the expression context (const version).
 
QgsRectangle extent () const
 Returns the 3D scene's 2D extent in the 3D scene's CRS.
 
float fieldOfView () const
 Returns the camera lens' field of view.
 
QgsVector3D mapToWorldCoordinates (const QgsVector3D &mapCoords) const
 Converts map coordinates to 3D world coordinates (applies offset and turns (x,y,z) into (x,-z,y)).
 
QgsVector3D origin () const
 Returns coordinates in map CRS at which 3D scene has origin (0,0,0)
 
double outputDpi () const
 Returns DPI used for conversion between real world units (e.g.
 
QColor selectionColor () const
 Returns color used for selected features.
 
void setExpressionContext (const QgsExpressionContext &context)
 Sets the expression context.
 
const QgsDateTimeRangetemporalRange () const
 Returns the temporal range for the map.
 
QgsTerrainGeneratorterrainGenerator () const
 Returns the terrain generator.
 
bool terrainRenderingEnabled () const
 Returns whether the 2D terrain surface will be rendered.
 
double terrainVerticalScale () const
 Returns vertical scale (exaggeration) of terrain.
 
QgsCoordinateTransformContext transformContext () const
 Returns the coordinate transform context, which stores various information regarding which datum transforms should be used when transforming points from a source to destination coordinate reference system.
 
QgsVector3D worldToMapCoordinates (const QgsVector3D &worldCoords) const
 Converts 3D world coordinates to map coordinates (applies offset and turns (x,y,z) into (x,-z,y)).
 

Additional Inherited Members

- Static Public Member Functions inherited from Qgs3DRenderContext
static Qgs3DRenderContext fromMapSettings (const Qgs3DMapSettings *mapSettings)
 Creates an initialized Qgs3DRenderContext instance from given Qgs3DMapSettings.
 

Detailed Description

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

Since
QGIS 3.18

Definition at line 41 of file qgspointcloudlayer3drenderer.h.

Constructor & Destructor Documentation

◆ QgsPointCloud3DRenderContext() [1/2]

QgsPointCloud3DRenderContext::QgsPointCloud3DRenderContext ( const Qgs3DRenderContext context,
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 29 of file qgspointcloudlayer3drenderer.cpp.

◆ QgsPointCloud3DRenderContext() [2/2]

QgsPointCloud3DRenderContext::QgsPointCloud3DRenderContext ( const QgsPointCloud3DRenderContext rh)
delete

Member Function Documentation

◆ attributes()

QgsPointCloudAttributeCollection QgsPointCloud3DRenderContext::attributes ( ) const
inline

Returns the attributes associated with the rendered block.

See also
setAttributes()

Definition at line 65 of file qgspointcloudlayer3drenderer.h.

◆ cancelRendering()

void QgsPointCloud3DRenderContext::cancelRendering ( ) const

Cancels rendering.

See also
isCanceled()

Definition at line 74 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 181 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 186 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 105 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 69 of file qgspointcloudlayer3drenderer.cpp.

◆ layerExtent()

QgsRectangle QgsPointCloud3DRenderContext::layerExtent ( ) const
inline

Returns the 3D scene's extent in layer crs.

Since
QGIS 3.30

Definition at line 192 of file qgspointcloudlayer3drenderer.h.

◆ operator=()

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

◆ 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 79 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 160 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 153 of file qgspointcloudlayer3drenderer.h.


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