QGIS API Documentation 4.3.0-Master (0cfde48c85b)
Loading...
Searching...
No Matches
qgspointcloudrenderer.h
Go to the documentation of this file.
1/***************************************************************************
2 qgspointcloudrenderer.h
3 --------------------
4 begin : October 2020
5 copyright : (C) 2020 by Peter Petrik
6 email : zilolv at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSPOINTCLOUDRENDERER_H
19#define QGSPOINTCLOUDRENDERER_H
20
21#include "qgis_core.h"
22#include "qgis_sip.h"
25#include "qgsrange.h"
26#include "qgsrendercontext.h"
27#include "qgsstyle.h"
28#include "qgsvector3d.h"
29
30#include <QString>
31#include <QStringList>
32
33using namespace Qt::StringLiterals;
34
39class QgsElevationMap;
41
51{
52 public:
66
69
73 QgsRenderContext &renderContext() { return mRenderContext; }
74
79 const QgsRenderContext &renderContext() const SIP_SKIP { return mRenderContext; }
80
84 QgsVector3D scale() const { return mScale; }
85
90 void setScale( const QgsVector3D &scale ) { mScale = scale; }
91
95 QgsVector3D offset() const { return mOffset; }
96
101 void setOffset( const QgsVector3D &offset ) { mOffset = offset; }
102
106 long pointsRendered() const;
107
114 void incrementPointsRendered( long count );
115
121 QgsPointCloudAttributeCollection attributes() const { return mAttributes; }
122
128 void setAttributes( const QgsPointCloudAttributeCollection &attributes );
129
133 int pointRecordSize() const { return mPointRecordSize; }
134
141 int xOffset() const { return mXOffset; }
142
149 int yOffset() const { return mYOffset; }
150
157 int zOffset() const { return mZOffset; }
158
164 double zValueScale() const { return mZValueScale; }
165
171 double zValueFixedOffset() const { return mZValueFixedOffset; }
172
178 QgsFeedback *feedback() const { return mFeedback; }
179
189 void setMapCrsZFilter( const QgsDoubleRange &range ) { mMapCrsZFilter = range; }
190
197 QgsDoubleRange mapCrsZFilter() const { return mMapCrsZFilter; }
198
199#ifndef SIP_RUN
200
205 template<typename T> static void getAttribute( const char *data, std::size_t offset, QgsPointCloudAttribute::DataType type, T &value )
206 {
207 switch ( type )
208 {
210 value = *reinterpret_cast< const unsigned char * >( data + offset );
211 return;
213 value = *( data + offset );
214 return;
215
217 value = *reinterpret_cast< const quint32 * >( data + offset );
218 return;
220 value = *reinterpret_cast< const qint32 * >( data + offset );
221 return;
222
224 value = *reinterpret_cast< const quint64 * >( data + offset );
225 return;
227 value = *reinterpret_cast< const qint64 * >( data + offset );
228 return;
229
231 value = *reinterpret_cast< const short * >( data + offset );
232 return;
233
235 value = *reinterpret_cast< const unsigned short * >( data + offset );
236 return;
237
239 value = *reinterpret_cast< const float * >( data + offset );
240 return;
241
243 value = *reinterpret_cast< const double * >( data + offset );
244 return;
245 }
246 }
247#endif
248
249#ifndef SIP_RUN // this is only meant for low-level rendering in C++ code
250
258 {
259 std::vector<double> points;
260 std::vector<QRgb> colors;
261 std::vector<float> elevations;
262 };
263
268 TriangulationData &triangulationData() { return mTriangulationData; }
269#endif
270
271 private:
272#ifdef SIP_RUN
274#endif
275
276 QgsRenderContext &mRenderContext;
277 QgsVector3D mScale;
278 QgsVector3D mOffset;
279 long mPointsRendered = 0;
281 int mPointRecordSize = 0;
282 int mXOffset = 0;
283 int mYOffset = 0;
284 int mZOffset = 0;
285 double mZValueScale = 1.0;
286 double mZValueFixedOffset = 0;
287
288 QgsDoubleRange mMapCrsZFilter;
289
290 QgsFeedback *mFeedback = nullptr;
291
292 TriangulationData mTriangulationData;
293};
294
295#ifndef SIP_RUN
296
307{
308 public:
310
314 virtual QSet< QString > usedAttributes() const = 0;
315
321 virtual bool prepareBlock( const QgsPointCloudBlock *block ) = 0;
322
330 virtual QColor pointColor( const QgsPointCloudBlock *block, int i, double z ) = 0;
331};
332
333#endif
334
335
344class CORE_EXPORT QgsPointCloudRenderer
345{
346#ifdef SIP_RUN
348
349 const QString type = sipCpp->type();
350
351 if ( type == "rgb"_L1 )
352 sipType = sipType_QgsPointCloudRgbRenderer;
353 else if ( type == "ramp"_L1 )
354 sipType = sipType_QgsPointCloudAttributeByRampRenderer;
355 else if ( type == "classified"_L1 )
356 sipType = sipType_QgsPointCloudClassifiedRenderer;
357 else if ( type == "extent"_L1 )
358 sipType = sipType_QgsPointCloudExtentRenderer;
359 else
360 sipType = 0;
361 SIP_END
362#endif
363
364 public:
365
370 enum class Property : int
371 {
372 Color = 0,
373 };
374
376
377 virtual ~QgsPointCloudRenderer() = default;
378
382 virtual QString type() const = 0;
383
389
392
395
399 virtual void renderBlock( const QgsPointCloudBlock *block, QgsPointCloudRenderContext &context ) = 0;
400
410 QVector<QVariantMap> identify( QgsPointCloudLayer *layer, const QgsRenderContext &context, const QgsGeometry &geometry, double toleranceForPointIdentification = 0 ) SIP_SKIP;
411
417 virtual bool willRenderPoint( const QMap<QString, QVariant> &pointAttributes )
418 {
419 Q_UNUSED( pointAttributes );
420 return true;
421 }
422
430 static QgsPointCloudRenderer *load( QDomElement &element, const QgsReadWriteContext &context ) SIP_FACTORY;
431
436 virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ) const = 0;
437
445 virtual QSet< QString > usedAttributes( const QgsPointCloudRenderContext &context ) const;
446
453 virtual std::unique_ptr< QgsPreparedPointCloudRendererData > prepare() SIP_SKIP;
454
464 virtual void startRender( QgsPointCloudRenderContext &context );
465
476 virtual void stopRender( QgsPointCloudRenderContext &context );
477
483 virtual bool legendItemChecked( const QString &key );
484
490 virtual void checkLegendItem( const QString &key, bool state = true );
491
498 void setPointSize( double size ) { mPointSize = size; }
499
509 double pointSize() const { return mPointSize; }
510
518 void setPointSizeUnit( const Qgis::RenderUnit units ) { mPointSizeUnit = units; }
519
526 Qgis::RenderUnit pointSizeUnit() const { return mPointSizeUnit; }
527
534 void setPointSizeMapUnitScale( const QgsMapUnitScale &scale ) { mPointSizeMapUnitScale = scale; }
535
542 const QgsMapUnitScale &pointSizeMapUnitScale() const { return mPointSizeMapUnitScale; }
543
550 Qgis::PointCloudDrawOrder drawOrder2d() const;
551
558 void setDrawOrder2d( Qgis::PointCloudDrawOrder order );
559
565 Qgis::PointCloudSymbol pointSymbol() const;
566
572 void setPointSymbol( Qgis::PointCloudSymbol symbol );
573
584 double maximumScreenError() const;
585
596 void setMaximumScreenError( double error );
597
604 Qgis::RenderUnit maximumScreenErrorUnit() const;
605
612 void setMaximumScreenErrorUnit( Qgis::RenderUnit unit );
613
619 bool renderAsTriangles() const { return mRenderAsTriangles; }
620
626 void setRenderAsTriangles( bool asTriangles ) { mRenderAsTriangles = asTriangles; }
627
638 bool horizontalTriangleFilter() const { return mHorizontalTriangleFilter; }
639
650 void setHorizontalTriangleFilter( bool enabled ) { mHorizontalTriangleFilter = enabled; }
651
663 double horizontalTriangleFilterThreshold() const { return mHorizontalTriangleFilterThreshold; }
664
676 void setHorizontalTriangleFilterThreshold( double threshold ) { mHorizontalTriangleFilterThreshold = threshold; }
677
687 Qgis::RenderUnit horizontalTriangleFilterUnit() const { return mHorizontalTriangleFilterUnit; }
688
698 void setHorizontalTriangleFilterUnit( Qgis::RenderUnit unit ) { mHorizontalTriangleFilterUnit = unit; }
699
703 virtual QList<QgsLayerTreeModelLegendNode *> createLegendNodes( QgsLayerTreeLayer *nodeLayer ) SIP_FACTORY;
704
708 virtual QStringList legendRuleKeys() const;
709
714 void setShowLabels( const bool show ) { mShowLabels = show; }
715
721 bool showLabels() const { return mShowLabels; }
722
727 void setLabelTextFormat( const QgsTextFormat &textFormat ) { mLabelTextFormat = textFormat; }
728
733 QgsTextFormat labelTextFormat() const { return mLabelTextFormat; }
734
739 void setZoomOutBehavior( const Qgis::PointCloudZoomOutRenderBehavior behavior ) { mZoomOutBehavior = behavior; }
740
745 Qgis::PointCloudZoomOutRenderBehavior zoomOutBehavior() const { return mZoomOutBehavior; }
746
756 void setOverviewSwitchingScale( const double value );
757
762 double overviewSwitchingScale() const { return mOverviewSwitchingScale; }
763
770 QgsElevationShadingRenderer elevationShadingRenderer() const;
771
778 void setElevationShadingRenderer( const QgsElevationShadingRenderer &renderer ) { mElevationShadingRenderer = renderer; }
779
785 static const QgsPropertiesDefinition &propertyDefinitions();
786
793 const QgsPropertyCollection &dataDefinedProperties() const { return mDataDefinedProperties; }
794
802 void setDataDefinedProperties( const QgsPropertyCollection &collection ) { mDataDefinedProperties = collection; }
803
804 protected:
808 static void pointXY( QgsPointCloudRenderContext &context, const char *ptr, int i, double &x, double &y )
809 {
810 // be wary when copying this code!! In the renderer we explicitly request x/y/z as qint32 values, but in other
811 // situations these may be floats or doubles!
812 const qint32 ix = *reinterpret_cast< const qint32 * >( ptr + i * context.pointRecordSize() + context.xOffset() );
813 const qint32 iy = *reinterpret_cast< const qint32 * >( ptr + i * context.pointRecordSize() + context.yOffset() );
814 x = context.offset().x() + context.scale().x() * ix;
815 y = context.offset().y() + context.scale().y() * iy;
816 }
817
821 static double pointZ( QgsPointCloudRenderContext &context, const char *ptr, int i )
822 {
823 // be wary when copying this code!! In the renderer we explicitly request x/y/z as qint32 values, but in other
824 // situations these may be floats or doubles!
825 const qint32 iz = *reinterpret_cast<const qint32 * >( ptr + i * context.pointRecordSize() + context.zOffset() );
826 return ( context.offset().z() + context.scale().z() * iz ) * context.zValueScale() + context.zValueFixedOffset();
827 }
828
832 void drawPoint( double x, double y, const QColor &color, QgsPointCloudRenderContext &context ) const { drawPoint( x, y, color, mDefaultPainterPenWidth, context ); }
833
839 void drawPoint( double x, double y, const QColor &color, int width, QgsPointCloudRenderContext &context ) const
840 {
841 const QPointF originalXY( x, y );
842 context.renderContext().mapToPixel().transformInPlace( x, y );
843 QPainter *painter = context.renderContext().painter();
844 switch ( mPointSymbol )
845 {
847 painter->fillRect( QRectF( x - width * 0.5, y - width * 0.5, width, width ), color );
848 break;
849
851 painter->setBrush( QBrush( color ) );
852 painter->setPen( Qt::NoPen );
853 painter->drawEllipse( QRectF( x - width * 0.5, y - width * 0.5, width, width ) );
854 break;
855 };
856 }
857
858#ifndef SIP_RUN // intentionally left out from SIP to avoid API breaks in future when we move elevation post-processing elsewhere
859
864 void drawPointToElevationMap( double x, double y, double z, QgsPointCloudRenderContext &context ) const;
865
870 void drawPointToElevationMap( double x, double y, double z, int width, QgsPointCloudRenderContext &context ) const;
871#endif
872
877 void addPointToTriangulation( double x, double y, double z, const QColor &color, QgsPointCloudRenderContext &context )
878 {
879 QgsPointXY p = context.renderContext().mapToPixel().transform( x, y ) * context.renderContext().devicePixelRatio();
881 triangulation.points.push_back( p.x() );
882 triangulation.points.push_back( p.y() );
883 triangulation.colors.push_back( color.rgb() );
884 if ( context.renderContext().elevationMap() )
885 triangulation.elevations.push_back( static_cast<float>( z ) );
886 }
887
891 void copyCommonProperties( QgsPointCloudRenderer *destination ) const;
892
899 void restoreCommonProperties( const QDomElement &element, const QgsReadWriteContext &context );
900
907 void saveCommonProperties( QDomElement &element, const QgsReadWriteContext &context ) const;
908
914 QColor colorFromExpression( const QgsPointCloudBlock *block, int pointIndex, const QColor &rendererColor, QgsPointCloudRenderContext &context ) SIP_SKIP;
915
916 private:
917#ifdef SIP_RUN
919#endif
920
921#ifdef QGISDEBUG
923 QThread *mThread = nullptr;
924#endif
925
926 double mMaximumScreenError = 0.3;
927 Qgis::RenderUnit mMaximumScreenErrorUnit = Qgis::RenderUnit::Millimeters;
928
929 double mPointSize = 1;
931 QgsMapUnitScale mPointSizeMapUnitScale;
932
934 int mDefaultPainterPenWidth = 1;
936
937 bool mRenderAsTriangles = false;
938 bool mHorizontalTriangleFilter = false;
939 double mHorizontalTriangleFilterThreshold = 5.0;
940 Qgis::RenderUnit mHorizontalTriangleFilterUnit = Qgis::RenderUnit::Millimeters;
941
942 bool mShowLabels = false;
943 QgsTextFormat mLabelTextFormat;
944
946 double mOverviewSwitchingScale = 1.0;
947
948 QgsElevationShadingRenderer mElevationShadingRenderer;
949
950 static void initPropertyDefinitions();
951 static QgsPropertiesDefinition sPropertyDefinitions;
952 QgsPropertyCollection mDataDefinedProperties;
953
954 std::unique_ptr<QgsExpressionContextScope> mExpressionContextScope;
955};
956
957#endif // QGSPOINTCLOUDRENDERER_H
PointCloudSymbol
Rendering symbols for point cloud points.
Definition qgis.h:4715
@ Circle
Renders points as circles.
Definition qgis.h:4717
@ Square
Renders points as squares.
Definition qgis.h:4716
PointCloudDrawOrder
Pointcloud rendering order for 2d views.
Definition qgis.h:4727
@ Default
Draw points in the order they are stored.
Definition qgis.h:4728
PointCloudZoomOutRenderBehavior
Point cloud zoom out options.
Definition qgis.h:6982
@ RenderExtents
Render only point cloud extents when zoomed out.
Definition qgis.h:6983
RenderUnit
Rendering size units.
Definition qgis.h:5758
@ Millimeters
Millimeters.
Definition qgis.h:5759
QgsRange which stores a range of double values.
Definition qgsrange.h:217
Stores a digital elevation model in a raster image which may get updated as a part of the map layer r...
Renders elevation shading on an image with different methods (eye dome lighting, hillshading,...
Single scope for storing variables and functions for use within a QgsExpressionContext.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition qgsfeedback.h:44
A geometry is the spatial representation of a feature.
Layer tree node points to a map layer.
An abstract interface for legend items returned from QgsMapLayerLegend implementation.
QgsPointXY transform(const QgsPointXY &p) const
Transforms a point p from map (world) coordinates to device coordinates.
void transformInPlace(double &x, double &y) const
Transforms map coordinates to device coordinates.
Struct for storing maximum and minimum scales for measurements in map units.
A collection of point cloud attributes.
DataType
Systems of unit measurement.
@ UShort
Unsigned short int 2 bytes.
@ UChar
Unsigned char 1 byte.
@ UInt32
Unsigned int32 4 bytes.
@ UInt64
Unsigned int64 8 bytes.
Base class for storing raw data from point cloud nodes.
Represents a map layer supporting display of point clouds.
Encapsulates the render context for a 2D point cloud rendering operation.
void setMapCrsZFilter(const QgsDoubleRange &range)
Sets the allowed range of Z values.
int yOffset() 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.
QgsVector3D offset() const
Returns the offset of the layer's int32 coordinates compared to CRS coords.
QgsRenderContext & renderContext()
Returns a reference to the context's render context.
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 da...
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.
int pointRecordSize() const
Returns the size of a single point record.
int xOffset() const
Returns the offset for the x value in a point record.
const QgsRenderContext & renderContext() const
Returns a reference to the context's render context.
QgsPointCloudRenderContext & operator=(const QgsPointCloudRenderContext &)=delete
QgsPointCloudRenderContext(const QgsPointCloudRenderContext &rh)=delete
double zValueScale() const
Returns any constant scaling factor which must be applied to z values taken from the point cloud inde...
QgsVector3D scale() const
Returns the scale of the layer's int32 coordinates compared to CRS coords.
QgsPointCloudAttributeCollection attributes() const
Returns the attributes associated with the rendered block.
TriangulationData & triangulationData()
Returns reference to the triangulation data structure (only used when rendering as triangles is enabl...
QgsPointCloudRenderContext(QgsRenderContext &context, const QgsVector3D &scale, const QgsVector3D &offset, double zValueScale, double zValueFixedOffset, QgsFeedback *feedback=nullptr)
Constructor for QgsPointCloudRenderContext.
int zOffset() const
Returns the offset for the y value in a point record.
QgsFeedback * feedback() const
Returns the feedback object used to cancel rendering.
QgsDoubleRange mapCrsZFilter() const
Returns the allowable range of z values in the map (destination) CRS.
Abstract base class for 2d point cloud renderers.
virtual QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context) const =0
Saves the renderer configuration to an XML element.
Qgis::PointCloudZoomOutRenderBehavior zoomOutBehavior() const
Returns the renderer behavior when zoomed out.
bool renderAsTriangles() const
Returns whether points are triangulated to render solid surface.
virtual void checkLegendItem(const QString &key, bool state=true)
Called when the check state of the legend item with the specified key is changed.
QgsTextFormat labelTextFormat() const
Returns the text format renderer is using for rendering labels.
virtual void renderBlock(const QgsPointCloudBlock *block, QgsPointCloudRenderContext &context)=0
Renders a block of point cloud data using the specified render context.
double overviewSwitchingScale() const
Returns the overview switching scale.
QgsPointCloudRenderer & operator=(const QgsPointCloudRenderer &other)=delete
QgsPointCloudRenderer cannot be copied – use clone() instead.
const QgsMapUnitScale & pointSizeMapUnitScale() const
Returns the map unit scale used for the point size.
void setDataDefinedProperties(const QgsPropertyCollection &collection)
Sets the renderer's property collection, used for data defined overrides.
virtual std::unique_ptr< QgsPreparedPointCloudRendererData > prepare()
Returns prepared data container for bulk point color retrieval.
void setPointSizeMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the point size.
virtual QSet< QString > usedAttributes(const QgsPointCloudRenderContext &context) const
Returns a list of attributes required by this renderer.
virtual bool legendItemChecked(const QString &key)
Returns true if the legend item with the specified key is checked.
void setPointSize(double size)
Sets the point size.
bool horizontalTriangleFilter() const
Returns whether large triangles will get rendered.
virtual QString type() const =0
Returns the identifier of the renderer type.
void setHorizontalTriangleFilterThreshold(double threshold)
Sets threshold for filtering of triangles.
void setHorizontalTriangleFilterUnit(Qgis::RenderUnit unit)
Sets units of the threshold for filtering of triangles.
QgsPointCloudRenderer(const QgsPointCloudRenderer &other)=delete
QgsPointCloudRenderer cannot be copied – use clone() instead.
bool showLabels() const
Returns whether the renderer shows file labels inside the extent rectangle.
virtual QgsPointCloudRenderer * clone() const =0
Create a deep copy of this renderer.
void addPointToTriangulation(double x, double y, double z, const QColor &color, QgsPointCloudRenderContext &context)
Adds a point to the list of points to be triangulated (only used when renderAsTriangles() is enabled)...
QVector< QVariantMap > identify(QgsPointCloudLayer *layer, const QgsRenderContext &context, const QgsGeometry &geometry, double toleranceForPointIdentification=0)
Returns the list of visible points of the point cloud layer layer and an extent defined by a geometry...
void setPointSizeUnit(const Qgis::RenderUnit units)
Sets the units used for the point size.
Qgis::RenderUnit horizontalTriangleFilterUnit() const
Returns units of the threshold for filtering of triangles.
Property
Data-defined properties that can be set on the renderer.
void setRenderAsTriangles(bool asTriangles)
Sets whether points are triangulated to render solid surface.
virtual bool willRenderPoint(const QMap< QString, QVariant > &pointAttributes)
Checks whether the point holding pointAttributes attributes will be rendered By default if not overri...
virtual ~QgsPointCloudRenderer()=default
void setLabelTextFormat(const QgsTextFormat &textFormat)
Sets the text format renderers should use for rendering labels.
void drawPoint(double x, double y, const QColor &color, QgsPointCloudRenderContext &context) const
Draws a point using a color at the specified x and y (in map coordinates).
void drawPoint(double x, double y, const QColor &color, int width, QgsPointCloudRenderContext &context) const
Draws a point using a color and painter width at the specified x and y (in map coordinates).
void setShowLabels(const bool show)
Set whether the renderer should also render file labels inside extent.
const QgsPropertyCollection & dataDefinedProperties() const
Returns the renderer's property collection, used for data defined overrides.
Qgis::RenderUnit pointSizeUnit() const
Returns the units used for the point size.
double horizontalTriangleFilterThreshold() const
Returns threshold for filtering of triangles.
virtual void startRender(QgsPointCloudRenderContext &context)
Must be called when a new render cycle is started.
virtual void stopRender(QgsPointCloudRenderContext &context)
Must be called when a render cycle has finished, to allow the renderer to clean up.
void setHorizontalTriangleFilter(bool enabled)
Sets whether large triangles will get rendered.
double pointSize() const
Returns the point size.
void setZoomOutBehavior(const Qgis::PointCloudZoomOutRenderBehavior behavior)
Sets the renderer behavior when zoomed out.
static double pointZ(QgsPointCloudRenderContext &context, const char *ptr, int i)
Retrieves the z value for the point at index i.
static void pointXY(QgsPointCloudRenderContext &context, const char *ptr, int i, double &x, double &y)
Retrieves the x and y coordinate for the point at index i.
void setElevationShadingRenderer(const QgsElevationShadingRenderer &renderer)
Sets the shading renderer used to render shading on the layer.
Represents a 2D point.
Definition qgspointxy.h:62
double y
Definition qgspointxy.h:66
double x
Definition qgspointxy.h:65
Base class for 2d point cloud renderer prepared data containers.
virtual QColor pointColor(const QgsPointCloudBlock *block, int i, double z)=0
An optimised method of retrieving the color of a point from a point cloud block.
virtual bool prepareBlock(const QgsPointCloudBlock *block)=0
Prepares the renderer for using the specified block.
virtual QSet< QString > usedAttributes() const =0
Returns the set of attributes used by the prepared point cloud renderer.
A grouped map of multiple QgsProperty objects, each referenced by an integer key value.
A container for the context for various read/write operations on objects.
Contains information about the context of a rendering operation.
QPainter * painter()
Returns the destination QPainter for the render operation.
QgsElevationMap * elevationMap() const
Returns the destination elevation map for the render operation.
float devicePixelRatio() const
Returns the device pixel ratio.
const QgsMapToPixel & mapToPixel() const
Returns the context's map to pixel transform, which transforms between map coordinates and device coo...
Container for all settings relating to text rendering.
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...
Definition qgsvector3d.h:33
double y() const
Returns Y coordinate.
Definition qgsvector3d.h:60
double z() const
Returns Z coordinate.
Definition qgsvector3d.h:62
double x() const
Returns X coordinate.
Definition qgsvector3d.h:58
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition qgis_sip.h:203
#define SIP_SKIP
Definition qgis_sip.h:138
#define SIP_FACTORY
Definition qgis_sip.h:83
#define SIP_END
Definition qgis_sip.h:220
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
Helper data structure used when rendering points as triangulated surface.
std::vector< QRgb > colors
RGB color for each point.
std::vector< float > elevations
Z value for each point (only used when global map shading is enabled).
std::vector< double > points
X,Y for each point - kept in this structure so that we can use it without further conversions in Dela...