QGIS API Documentation  3.20.0-Odense (decaadbb31)
Public Member Functions | List of all members
QgsPointCloudRenderContext Class Reference

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

#include <qgspointcloudrenderer.h>

Public Member Functions

 QgsPointCloudRenderContext (const QgsPointCloudRenderContext &rh)=delete
 QgsPointCloudRenderContext cannot be copied. More...
 
 QgsPointCloudRenderContext (QgsRenderContext &context, const QgsVector3D &scale, const QgsVector3D &offset, double zValueScale, double zValueFixedOffset, QgsFeedback *feedback=nullptr)
 Constructor for QgsPointCloudRenderContext. More...
 
QgsPointCloudAttributeCollection attributes () const
 Returns the attributes associated with the rendered block. More...
 
QgsFeedbackfeedback () const
 Returns the feedback object used to cancel rendering. 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...
 
void incrementPointsRendered (long count)
 Increments the count of points rendered by the specified amount. More...
 
QgsVector3D offset () const
 Returns the offset of the layer's int32 coordinates compared to CRS coords. More...
 
QgsPointCloudRenderContextoperator= (const QgsPointCloudRenderContext &)=delete
 QgsPointCloudRenderContext cannot be copied. More...
 
int pointRecordSize () const
 Returns the size of a single point record. More...
 
long pointsRendered () const
 Returns the total number of points rendered. More...
 
QgsRenderContextrenderContext ()
 Returns a reference to the context's render context. More...
 
const QgsRenderContextrenderContext () const
 Returns a reference to the context's render context. More...
 
QgsVector3D scale () const
 Returns the scale of the layer's int32 coordinates compared to CRS coords. More...
 
void setAttributes (const QgsPointCloudAttributeCollection &attributes)
 Sets the attributes associated with the rendered block. More...
 
void setOffset (const QgsVector3D &offset)
 Sets the offset of the layer's int32 coordinates compared to CRS coords. More...
 
void setScale (const QgsVector3D &scale)
 Sets the scale of the layer's int32 coordinates compared to CRS coords. More...
 
int xOffset () const
 Returns the offset for the x value in a point record. More...
 
int yOffset () const
 Returns the offset for the y value in a point record. More...
 
int zOffset () const
 Returns the offset for the y value in a point record. 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 2D point cloud rendering operation.

Since
QGIS 3.18

Definition at line 41 of file qgspointcloudrenderer.h.

Constructor & Destructor Documentation

◆ QgsPointCloudRenderContext() [1/2]

QgsPointCloudRenderContext::QgsPointCloudRenderContext ( QgsRenderContext context,
const QgsVector3D scale,
const QgsVector3D offset,
double  zValueScale,
double  zValueFixedOffset,
QgsFeedback feedback = nullptr 
)

Constructor for QgsPointCloudRenderContext.

The scale and offset arguments specify the scale and offset of the layer's int32 coordinates compared to CRS coordinates respectively.

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 qgspointcloudrenderer.cpp.

◆ QgsPointCloudRenderContext() [2/2]

QgsPointCloudRenderContext::QgsPointCloudRenderContext ( const QgsPointCloudRenderContext rh)
delete

QgsPointCloudRenderContext cannot be copied.

Member Function Documentation

◆ attributes()

QgsPointCloudAttributeCollection QgsPointCloudRenderContext::attributes ( ) const
inline

Returns the attributes associated with the rendered block.

See also
setAttributes()

Definition at line 117 of file qgspointcloudrenderer.h.

◆ feedback()

QgsFeedback* QgsPointCloudRenderContext::feedback ( ) const
inline

Returns the feedback object used to cancel rendering.

Since
QGIS 3.20

Definition at line 174 of file qgspointcloudrenderer.h.

◆ getAttribute()

template<typename T >
void QgsPointCloudRenderContext::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 183 of file qgspointcloudrenderer.h.

◆ incrementPointsRendered()

void QgsPointCloudRenderContext::incrementPointsRendered ( long  count)

Increments the count of points rendered by the specified amount.

It is a point cloud renderer's responsibility to correctly call this after rendering a block of points.

Definition at line 46 of file qgspointcloudrenderer.cpp.

◆ offset()

QgsVector3D QgsPointCloudRenderContext::offset ( ) const
inline

Returns the offset of the layer's int32 coordinates compared to CRS coords.

Definition at line 91 of file qgspointcloudrenderer.h.

◆ operator=()

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

QgsPointCloudRenderContext cannot be copied.

◆ pointRecordSize()

int QgsPointCloudRenderContext::pointRecordSize ( ) const
inline

Returns the size of a single point record.

Definition at line 129 of file qgspointcloudrenderer.h.

◆ pointsRendered()

long QgsPointCloudRenderContext::pointsRendered ( ) const

Returns the total number of points rendered.

Definition at line 41 of file qgspointcloudrenderer.cpp.

◆ renderContext() [1/2]

QgsRenderContext& QgsPointCloudRenderContext::renderContext ( )
inline

Returns a reference to the context's render context.

Definition at line 69 of file qgspointcloudrenderer.h.

◆ renderContext() [2/2]

const QgsRenderContext& QgsPointCloudRenderContext::renderContext ( ) const
inline

Returns a reference to the context's render context.

Note
Not available in Python bindings.

Definition at line 75 of file qgspointcloudrenderer.h.

◆ scale()

QgsVector3D QgsPointCloudRenderContext::scale ( ) const
inline

Returns the scale of the layer's int32 coordinates compared to CRS coords.

Definition at line 80 of file qgspointcloudrenderer.h.

◆ setAttributes()

void QgsPointCloudRenderContext::setAttributes ( const QgsPointCloudAttributeCollection attributes)

Sets the attributes associated with the rendered block.

See also
attributes()

Definition at line 51 of file qgspointcloudrenderer.cpp.

◆ setOffset()

void QgsPointCloudRenderContext::setOffset ( const QgsVector3D offset)
inline

Sets the offset of the layer's int32 coordinates compared to CRS coords.

Since
QGIS 3.20

Definition at line 97 of file qgspointcloudrenderer.h.

◆ setScale()

void QgsPointCloudRenderContext::setScale ( const QgsVector3D scale)
inline

Sets the scale of the layer's int32 coordinates compared to CRS coords.

Since
QGIS 3.20

Definition at line 86 of file qgspointcloudrenderer.h.

◆ xOffset()

int QgsPointCloudRenderContext::xOffset ( ) const
inline

Returns the offset for the x value in a point record.

See also
yOffset()
zOffset()

Definition at line 137 of file qgspointcloudrenderer.h.

◆ yOffset()

int QgsPointCloudRenderContext::yOffset ( ) const
inline

Returns the offset for the y value in a point record.

See also
xOffset()
zOffset()

Definition at line 145 of file qgspointcloudrenderer.h.

◆ zOffset()

int QgsPointCloudRenderContext::zOffset ( ) const
inline

Returns the offset for the y value in a point record.

See also
xOffset()
yOffset()

Definition at line 153 of file qgspointcloudrenderer.h.

◆ zValueFixedOffset()

double QgsPointCloudRenderContext::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 167 of file qgspointcloudrenderer.h.

◆ zValueScale()

double QgsPointCloudRenderContext::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 160 of file qgspointcloudrenderer.h.


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