QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
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... | |
QgsElevationMap * | elevationMap () |
Returns elevation map. More... | |
QgsFeedback * | feedback () const |
Returns the feedback object used to cancel rendering. 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... | |
QgsPointCloudRenderContext & | operator= (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... | |
QgsRenderContext & | renderContext () |
Returns a reference to the context's render context. More... | |
const QgsRenderContext & | renderContext () 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 | setElevationMap (QgsElevationMap *elevationMap) |
Sets elevation map that will be used to record elevation of rendered points. 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... | |
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. More... | |
Encapsulates the render context for a 2D point cloud rendering operation.
Definition at line 43 of file qgspointcloudrenderer.h.
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 31 of file qgspointcloudrenderer.cpp.
|
delete |
QgsPointCloudRenderContext cannot be copied.
|
inline |
Returns the attributes associated with the rendered block.
Definition at line 119 of file qgspointcloudrenderer.h.
|
inline |
Returns elevation map.
It may be a null pointer if elevation map is not needed in rendering.
Definition at line 193 of file qgspointcloudrenderer.h.
|
inline |
Returns the feedback object used to cancel rendering.
Definition at line 176 of file qgspointcloudrenderer.h.
|
inlinestatic |
Retrieves the attribute value from data at the specified offset, where type indicates the original data type for the attribute.
Definition at line 203 of file qgspointcloudrenderer.h.
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 52 of file qgspointcloudrenderer.cpp.
|
inline |
Returns the offset of the layer's int32 coordinates compared to CRS coords.
Definition at line 93 of file qgspointcloudrenderer.h.
|
delete |
QgsPointCloudRenderContext cannot be copied.
|
inline |
Returns the size of a single point record.
Definition at line 131 of file qgspointcloudrenderer.h.
long QgsPointCloudRenderContext::pointsRendered | ( | ) | const |
Returns the total number of points rendered.
Definition at line 47 of file qgspointcloudrenderer.cpp.
|
inline |
Returns a reference to the context's render context.
Definition at line 71 of file qgspointcloudrenderer.h.
|
inline |
Returns a reference to the context's render context.
Definition at line 77 of file qgspointcloudrenderer.h.
|
inline |
Returns the scale of the layer's int32 coordinates compared to CRS coords.
Definition at line 82 of file qgspointcloudrenderer.h.
void QgsPointCloudRenderContext::setAttributes | ( | const QgsPointCloudAttributeCollection & | attributes | ) |
Sets the attributes associated with the rendered block.
Definition at line 57 of file qgspointcloudrenderer.cpp.
void QgsPointCloudRenderContext::setElevationMap | ( | QgsElevationMap * | elevationMap | ) |
Sets elevation map that will be used to record elevation of rendered points.
Definition at line 42 of file qgspointcloudrenderer.cpp.
|
inline |
Sets the offset of the layer's int32 coordinates compared to CRS coords.
Definition at line 99 of file qgspointcloudrenderer.h.
|
inline |
Sets the scale of the layer's int32 coordinates compared to CRS coords.
Definition at line 88 of file qgspointcloudrenderer.h.
|
inline |
Returns the offset for the x value in a point record.
Definition at line 139 of file qgspointcloudrenderer.h.
|
inline |
Returns the offset for the y value in a point record.
Definition at line 147 of file qgspointcloudrenderer.h.
|
inline |
Returns the offset for the y value in a point record.
Definition at line 155 of file qgspointcloudrenderer.h.
|
inline |
Returns any constant offset which must be applied to z values taken from the point cloud index.
Definition at line 169 of file qgspointcloudrenderer.h.
|
inline |
Returns any constant scaling factor which must be applied to z values taken from the point cloud index.
Definition at line 162 of file qgspointcloudrenderer.h.