QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static 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>

Classes

struct  TriangulationData
 Helper data structure used when rendering points as triangulated surface. More...
 

Public Member Functions

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

Static Public Member Functions

template<typename T >
static void getAttribute (const char *data, std::size_t offset, QgsPointCloudAttribute::DataType type, T &value)
 Retrieves the attribute value from data at the specified offset, where type indicates the original data type for the attribute.
 

Detailed Description

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

Since
QGIS 3.18

Definition at line 43 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 32 of file qgspointcloudrenderer.cpp.

◆ QgsPointCloudRenderContext() [2/2]

QgsPointCloudRenderContext::QgsPointCloudRenderContext ( const QgsPointCloudRenderContext rh)
delete

Member Function Documentation

◆ attributes()

QgsPointCloudAttributeCollection QgsPointCloudRenderContext::attributes ( ) const
inline

Returns the attributes associated with the rendered block.

See also
setAttributes()

Definition at line 116 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 173 of file qgspointcloudrenderer.h.

◆ getAttribute()

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

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

Definition at line 182 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 48 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 90 of file qgspointcloudrenderer.h.

◆ operator=()

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

◆ pointRecordSize()

int QgsPointCloudRenderContext::pointRecordSize ( ) const
inline

Returns the size of a single point record.

Definition at line 128 of file qgspointcloudrenderer.h.

◆ pointsRendered()

long QgsPointCloudRenderContext::pointsRendered ( ) const

Returns the total number of points rendered.

Definition at line 43 of file qgspointcloudrenderer.cpp.

◆ renderContext() [1/2]

QgsRenderContext & QgsPointCloudRenderContext::renderContext ( )
inline

Returns a reference to the context's render context.

Definition at line 68 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 74 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 79 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 53 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 96 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 85 of file qgspointcloudrenderer.h.

◆ triangulationData()

TriangulationData & QgsPointCloudRenderContext::triangulationData ( )
inline

Returns reference to the triangulation data structure (only used when rendering as triangles is enabled)

Since
QGIS 3.36

Definition at line 245 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 136 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 144 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 152 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 166 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 159 of file qgspointcloudrenderer.h.


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