QGIS API Documentation
3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
src
core
pointcloud
qgspointcloudattributebyramprenderer.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgspointcloudattributebyramprenderer.h
3
--------------------
4
begin : October 2020
5
copyright : (C) 2020 by Nyall Dawson
6
email : nyall dot dawson 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 QGSPOINTCLOUDATTRIBUTEBYRAMPRENDERER_H
19
#define QGSPOINTCLOUDATTRIBUTEBYRAMPRENDERER_H
20
21
#include "
qgspointcloudrenderer.h
"
22
#include "qgis_core.h"
23
#include "
qgis_sip.h
"
24
#include "
qgscolorrampshader.h
"
25
26
#ifndef SIP_RUN
27
36
class
CORE_EXPORT
QgsPointCloudAttributeByRampRendererPreparedData
:
public
QgsPreparedPointCloudRendererData
37
{
38
public
:
39
40
QSet< QString >
usedAttributes
()
const override
;
41
bool
prepareBlock
(
const
QgsPointCloudBlock
*block )
override
;
42
QColor
pointColor
(
const
QgsPointCloudBlock
*block,
int
i,
double
z )
override
SIP_SKIP
;
43
44
QString
attributeName
;
45
QgsColorRampShader
colorRampShader
;
46
int
attributeOffset = 0;
47
bool
attributeIsX =
false
;
48
bool
attributeIsY =
false
;
49
bool
attributeIsZ =
false
;
50
QgsPointCloudAttribute::DataType
attributeType
;
51
};
52
#endif
53
54
61
class
CORE_EXPORT
QgsPointCloudAttributeByRampRenderer
:
public
QgsPointCloudRenderer
62
{
63
public
:
64
68
QgsPointCloudAttributeByRampRenderer
();
69
70
QString type()
const override
;
71
QgsPointCloudRenderer
*clone()
const override
;
72
void
renderBlock(
const
QgsPointCloudBlock
*block,
QgsPointCloudRenderContext
&context )
override
;
73
QDomElement save( QDomDocument &doc,
const
QgsReadWriteContext
&context )
const override
;
74
QSet< QString >
usedAttributes
(
const
QgsPointCloudRenderContext
&context )
const override
;
75
QList<QgsLayerTreeModelLegendNode *> createLegendNodes(
QgsLayerTreeLayer
*nodeLayer )
override
SIP_FACTORY
;
76
std::unique_ptr< QgsPreparedPointCloudRendererData > prepare()
override
SIP_SKIP
;
77
81
static
QgsPointCloudRenderer
*create( QDomElement &element,
const
QgsReadWriteContext
&context )
SIP_FACTORY
;
82
88
QString attribute()
const
;
89
95
void
setAttribute(
const
QString &attribute );
96
102
QgsColorRampShader
colorRampShader()
const
;
103
109
void
setColorRampShader(
const
QgsColorRampShader
&shader );
110
117
double
minimum()
const
;
118
125
void
setMinimum(
double
minimum );
126
133
double
maximum()
const
;
134
141
void
setMaximum(
double
maximum );
142
143
private
:
144
145
double
mMin = 0;
146
double
mMax = 100;
147
148
QString mAttribute = QStringLiteral(
"Intensity"
);
149
QgsColorRampShader
mColorRampShader;
150
151
};
152
153
#endif
// QGSPOINTCLOUDATTRIBUTEBYRAMPRENDERER_H
QgsColorRampShader
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
Definition
qgscolorrampshader.h:44
QgsLayerTreeLayer
Layer tree node points to a map layer.
Definition
qgslayertreelayer.h:43
QgsPointCloudAttributeByRampRendererPreparedData
Prepared data container for QgsPointCloudAttributeByRampRenderer.
Definition
qgspointcloudattributebyramprenderer.h:37
QgsPointCloudAttributeByRampRendererPreparedData::attributeName
QString attributeName
Definition
qgspointcloudattributebyramprenderer.h:44
QgsPointCloudAttributeByRampRendererPreparedData::colorRampShader
QgsColorRampShader colorRampShader
Definition
qgspointcloudattributebyramprenderer.h:45
QgsPointCloudAttributeByRampRendererPreparedData::attributeType
QgsPointCloudAttribute::DataType attributeType
Definition
qgspointcloudattributebyramprenderer.h:50
QgsPointCloudAttributeByRampRenderer
An RGB renderer for 2d visualisation of point clouds using embedded red, green and blue attributes.
Definition
qgspointcloudattributebyramprenderer.h:62
QgsPointCloudAttribute::DataType
DataType
Systems of unit measurement.
Definition
qgspointcloudattribute.h:45
QgsPointCloudBlock
Base class for storing raw data from point cloud nodes.
Definition
qgspointcloudblock.h:39
QgsPointCloudRenderContext
Encapsulates the render context for a 2D point cloud rendering operation.
Definition
qgspointcloudrenderer.h:44
QgsPointCloudRenderer
Abstract base class for 2d point cloud renderers.
Definition
qgspointcloudrenderer.h:322
QgsPreparedPointCloudRendererData
Base class for 2d point cloud renderer prepared data containers.
Definition
qgspointcloudrenderer.h:282
QgsPreparedPointCloudRendererData::pointColor
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.
QgsPreparedPointCloudRendererData::prepareBlock
virtual bool prepareBlock(const QgsPointCloudBlock *block)=0
Prepares the renderer for using the specified block.
QgsPreparedPointCloudRendererData::usedAttributes
virtual QSet< QString > usedAttributes() const =0
Returns the set of attributes used by the prepared point cloud renderer.
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition
qgsreadwritecontext.h:34
qgis_sip.h
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:126
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:76
qgscolorrampshader.h
qgspointcloudrenderer.h
Generated on Thu Dec 26 2024 02:19:01 for QGIS API Documentation by
1.9.8