QGIS API Documentation 4.1.0-Master (376402f9aeb)
Loading...
Searching...
No Matches
qgspointcloud3dsymbol.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgspointcloud3dsymbol.h
3 ------------------------------
4 Date : November 2020
5 Copyright : (C) 2020 by Nedjima Belgacem
6 Email : belgacem dot nedjima at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
17
18#include "qgs3dutils.h"
19#include "qgscolorramptexture.h"
20#include "qgscolorutils.h"
21#include "qgsmaterial.h"
22
23#include <QString>
24#include <Qt3DRender/QParameter>
25#include <Qt3DRender/QTexture>
26
27using namespace Qt::StringLiterals;
28
29// QgsPointCloud3DSymbol
30
31
35
38
40{
41 mPointSize = size;
42}
43
48
50{
51 mRenderAsTriangles = asTriangles;
52}
53
58
63
68
73
78
83
88
93
94void QgsPointCloud3DSymbol::writeBaseXml( QDomElement &elem, const QgsReadWriteContext &context ) const
95{
96 Q_UNUSED( context )
97
98 elem.setAttribute( u"point-size"_s, mPointSize );
99 elem.setAttribute( u"render-as-triangles"_s, mRenderAsTriangles ? 1 : 0 );
100 elem.setAttribute( u"horizontal-triangle-filter"_s, mHorizontalTriangleFilter ? 1 : 0 );
101 elem.setAttribute( u"horizontal-filter-threshold"_s, mHorizontalFilterThreshold );
102 elem.setAttribute( u"vertical-triangle-filter"_s, mVerticalTriangleFilter ? 1 : 0 );
103 elem.setAttribute( u"vertical-filter-threshold"_s, mVerticalFilterThreshold );
104}
105
106void QgsPointCloud3DSymbol::readBaseXml( const QDomElement &elem, const QgsReadWriteContext &context )
107{
108 Q_UNUSED( context )
109
110 mPointSize = elem.attribute( u"point-size"_s, u"3.0"_s ).toFloat();
111 mRenderAsTriangles = elem.attribute( u"render-as-triangles"_s, u"0"_s ).toInt() == 1;
112 mHorizontalTriangleFilter = elem.attribute( u"horizontal-triangle-filter"_s, u"0"_s ).toInt() == 1;
113 mHorizontalFilterThreshold = elem.attribute( u"horizontal-filter-threshold"_s, u"10.0"_s ).toFloat();
114 mVerticalTriangleFilter = elem.attribute( u"vertical-triangle-filter"_s, u"0"_s ).toInt() == 1;
115 mVerticalFilterThreshold = elem.attribute( u"vertical-filter-threshold"_s, u"10.0"_s ).toFloat();
116}
117
129
130// QgsSingleColorPointCloud3DSymbol
131
135
137{
138 return u"single-color"_s;
139}
140
142{
144 result->mSingleColor = mSingleColor;
145 copyBaseSettings( result );
146 return result;
147}
148
149void QgsSingleColorPointCloud3DSymbol::writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const
150{
151 Q_UNUSED( context )
152
153 writeBaseXml( elem, context );
154 elem.setAttribute( u"single-color"_s, QgsColorUtils::colorToString( mSingleColor ) );
155}
156
157void QgsSingleColorPointCloud3DSymbol::readXml( const QDomElement &elem, const QgsReadWriteContext &context )
158{
159 Q_UNUSED( context )
160
161 readBaseXml( elem, context );
162 mSingleColor = QgsColorUtils::colorFromString( elem.attribute( u"single-color"_s, u"0,0,255"_s ) );
163}
164
166{
167 mSingleColor = color;
168}
169
171{
172 Qt3DRender::QParameter *renderingStyle = new Qt3DRender::QParameter( "u_renderingStyle", QgsPointCloud3DSymbol::SingleColor );
173 mat->addParameter( renderingStyle );
174 Qt3DRender::QParameter *pointSizeParameter = new Qt3DRender::QParameter( "u_pointSize", QVariant::fromValue( mPointSize ) );
175 mat->addParameter( pointSizeParameter );
176 const QColor linearColor = Qgs3DUtils::srgbToLinear( mSingleColor );
177 Qt3DRender::QParameter *singleColorParameter = new Qt3DRender::QParameter( "u_singleColor", QVector3D( linearColor.redF(), linearColor.greenF(), linearColor.blueF() ) );
178 mat->addParameter( singleColorParameter );
179}
180
181// QgsColorRampPointCloud3DSymbol
182
186
188{
190 result->mRenderingParameter = mRenderingParameter;
191 result->mColorRampShader = mColorRampShader;
192 result->mColorRampShaderMin = mColorRampShaderMin;
193 result->mColorRampShaderMax = mColorRampShaderMax;
194 copyBaseSettings( result );
195 return result;
196}
197
199{
200 return u"color-ramp"_s;
201}
202
203void QgsColorRampPointCloud3DSymbol::writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const
204{
205 Q_UNUSED( context )
206
207 writeBaseXml( elem, context );
208 elem.setAttribute( u"rendering-parameter"_s, mRenderingParameter );
209 elem.setAttribute( u"color-ramp-shader-min"_s, mColorRampShaderMin );
210 elem.setAttribute( u"color-ramp-shader-max"_s, mColorRampShaderMax );
211 QDomDocument doc = elem.ownerDocument();
212 const QDomElement elemColorRampShader = mColorRampShader.writeXml( doc );
213 elem.appendChild( elemColorRampShader );
214}
215
216void QgsColorRampPointCloud3DSymbol::readXml( const QDomElement &elem, const QgsReadWriteContext &context )
217{
218 Q_UNUSED( context )
219
220 readBaseXml( elem, context );
221 mRenderingParameter = elem.attribute( "rendering-parameter", QString() );
222 mColorRampShaderMin = elem.attribute( u"color-ramp-shader-min"_s, u"0.0"_s ).toDouble();
223 mColorRampShaderMax = elem.attribute( u"color-ramp-shader-max"_s, u"1.0"_s ).toDouble();
224 mColorRampShader.readXml( elem );
225}
226
228{
229 return mRenderingParameter;
230}
231
232void QgsColorRampPointCloud3DSymbol::setAttribute( const QString &parameter )
233{
234 mRenderingParameter = parameter;
235}
236
238{
239 return mColorRampShader;
240}
241
246
248{
249 mColorRampShaderMin = min;
250 mColorRampShaderMax = max;
251}
252
254{
255 Qt3DRender::QParameter *renderingStyle = new Qt3DRender::QParameter( "u_renderingStyle", QgsPointCloud3DSymbol::ColorRamp );
256 mat->addParameter( renderingStyle );
257 Qt3DRender::QParameter *pointSizeParameter = new Qt3DRender::QParameter( "u_pointSize", QVariant::fromValue( mPointSize ) );
258 mat->addParameter( pointSizeParameter );
259 // Create the texture to pass the color ramp
260 Qt3DRender::QTexture1D *colorRampTexture = nullptr;
261 if ( mColorRampShader.colorRampItemList().count() > 0 )
262 {
263 colorRampTexture = new Qt3DRender::QTexture1D( mat );
264 colorRampTexture->addTextureImage( new QgsColorRampTexture( mColorRampShader, 1 ) );
265 colorRampTexture->setMinificationFilter( Qt3DRender::QTexture1D::Linear );
266 colorRampTexture->setMagnificationFilter( Qt3DRender::QTexture1D::Linear );
267 // note -- this texture is an exception, we do NOT set it to srgb format as we do NOT want
268 // it linearised before sampling. That is because we need to do the interpolation on the ramp
269 // in SRGB color space. The shader converts the result after sampling the ramp to linear.
270 }
271
272 // Parameters
273 Qt3DRender::QParameter *colorRampTextureParameter = new Qt3DRender::QParameter( "u_colorRampTexture", colorRampTexture );
274 mat->addParameter( colorRampTextureParameter );
275 Qt3DRender::QParameter *colorRampCountParameter = new Qt3DRender::QParameter( "u_colorRampCount", mColorRampShader.colorRampItemList().count() );
276 mat->addParameter( colorRampCountParameter );
277 const Qgis::ShaderInterpolationMethod colorRampType = mColorRampShader.colorRampType();
278 Qt3DRender::QParameter *colorRampTypeParameter = new Qt3DRender::QParameter( "u_colorRampType", static_cast<int>( colorRampType ) );
279 mat->addParameter( colorRampTypeParameter );
280}
281
282// QgsRgbPointCloud3DSymbol
283
287
289{
290 return u"rgb"_s;
291}
292
294{
296 result->mRedAttribute = mRedAttribute;
297 result->mGreenAttribute = mGreenAttribute;
298 result->mBlueAttribute = mBlueAttribute;
299
300 if ( mRedContrastEnhancement )
301 {
302 result->setRedContrastEnhancement( new QgsContrastEnhancement( *mRedContrastEnhancement ) );
303 }
304 if ( mGreenContrastEnhancement )
305 {
306 result->setGreenContrastEnhancement( new QgsContrastEnhancement( *mGreenContrastEnhancement ) );
307 }
308 if ( mBlueContrastEnhancement )
309 {
310 result->setBlueContrastEnhancement( new QgsContrastEnhancement( *mBlueContrastEnhancement ) );
311 }
312 copyBaseSettings( result );
313 return result;
314}
315
316void QgsRgbPointCloud3DSymbol::writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const
317{
318 Q_UNUSED( context )
319
320 writeBaseXml( elem, context );
321
322 elem.setAttribute( u"red"_s, mRedAttribute );
323 elem.setAttribute( u"green"_s, mGreenAttribute );
324 elem.setAttribute( u"blue"_s, mBlueAttribute );
325
326 QDomDocument doc = elem.ownerDocument();
327
328 //contrast enhancement
329 if ( mRedContrastEnhancement )
330 {
331 QDomElement redContrastElem = doc.createElement( u"redContrastEnhancement"_s );
332 mRedContrastEnhancement->writeXml( doc, redContrastElem );
333 elem.appendChild( redContrastElem );
334 }
335 if ( mGreenContrastEnhancement )
336 {
337 QDomElement greenContrastElem = doc.createElement( u"greenContrastEnhancement"_s );
338 mGreenContrastEnhancement->writeXml( doc, greenContrastElem );
339 elem.appendChild( greenContrastElem );
340 }
341 if ( mBlueContrastEnhancement )
342 {
343 QDomElement blueContrastElem = doc.createElement( u"blueContrastEnhancement"_s );
344 mBlueContrastEnhancement->writeXml( doc, blueContrastElem );
345 elem.appendChild( blueContrastElem );
346 }
347}
348
349void QgsRgbPointCloud3DSymbol::readXml( const QDomElement &elem, const QgsReadWriteContext &context )
350{
351 Q_UNUSED( context )
352
353 readBaseXml( elem, context );
354
355 setRedAttribute( elem.attribute( u"red"_s, u"Red"_s ) );
356 setGreenAttribute( elem.attribute( u"green"_s, u"Green"_s ) );
357 setBlueAttribute( elem.attribute( u"blue"_s, u"Blue"_s ) );
358
359 //contrast enhancements
361 const QDomElement redContrastElem = elem.firstChildElement( u"redContrastEnhancement"_s );
362 if ( !redContrastElem.isNull() )
363 {
365 redContrastEnhancement->readXml( redContrastElem );
367 }
368
370 const QDomElement greenContrastElem = elem.firstChildElement( u"greenContrastEnhancement"_s );
371 if ( !greenContrastElem.isNull() )
372 {
374 greenContrastEnhancement->readXml( greenContrastElem );
376 }
377
379 const QDomElement blueContrastElem = elem.firstChildElement( u"blueContrastEnhancement"_s );
380 if ( !blueContrastElem.isNull() )
381 {
383 blueContrastEnhancement->readXml( blueContrastElem );
385 }
386}
387
389{
390 Qt3DRender::QParameter *renderingStyle = new Qt3DRender::QParameter( "u_renderingStyle", QgsPointCloud3DSymbol::RgbRendering );
391 mat->addParameter( renderingStyle );
392 Qt3DRender::QParameter *pointSizeParameter = new Qt3DRender::QParameter( "u_pointSize", QVariant::fromValue( mPointSize ) );
393 mat->addParameter( pointSizeParameter );
394}
395
396
398{
399 return mRedAttribute;
400}
401
403{
404 mRedAttribute = redAttribute;
405}
406
408{
409 return mGreenAttribute;
410}
411
413{
414 mGreenAttribute = greenAttribute;
415}
416
418{
419 return mBlueAttribute;
420}
421
423{
424 mBlueAttribute = blueAttribute;
425}
426
428{
429 return mRedContrastEnhancement.get();
430}
431
433{
434 mRedContrastEnhancement.reset( enhancement );
435}
436
438{
439 return mGreenContrastEnhancement.get();
440}
441
443{
444 mGreenContrastEnhancement.reset( enhancement );
445}
446
448{
449 return mBlueContrastEnhancement.get();
450}
451
453{
454 mBlueContrastEnhancement.reset( enhancement );
455}
456
457// QgsClassificationPointCloud3DSymbol
458
459
463
465{
467 result->mRenderingParameter = mRenderingParameter;
468 result->mCategoriesList = mCategoriesList;
469 copyBaseSettings( result );
470 return result;
471}
472
474{
475 return u"classification"_s;
476}
477
478void QgsClassificationPointCloud3DSymbol::writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const
479{
480 Q_UNUSED( context )
481 QDomDocument doc = elem.ownerDocument();
482
483 writeBaseXml( elem, context );
484
485 elem.setAttribute( u"rendering-parameter"_s, mRenderingParameter );
486
487 // categories
488 QDomElement catsElem = doc.createElement( u"categories"_s );
489 for ( const QgsPointCloudCategory &category : mCategoriesList )
490 {
491 QDomElement catElem = doc.createElement( u"category"_s );
492 catElem.setAttribute( u"value"_s, QString::number( category.value() ) );
493 catElem.setAttribute( u"pointSize"_s, category.pointSize() );
494 catElem.setAttribute( u"label"_s, category.label() );
495 catElem.setAttribute( u"color"_s, QgsColorUtils::colorToString( category.color() ) );
496 catElem.setAttribute( u"render"_s, category.renderState() ? "true" : "false" );
497 catsElem.appendChild( catElem );
498 }
499 elem.appendChild( catsElem );
500}
501
502void QgsClassificationPointCloud3DSymbol::readXml( const QDomElement &elem, const QgsReadWriteContext &context )
503{
504 Q_UNUSED( context )
505
506 readBaseXml( elem, context );
507 mRenderingParameter = elem.attribute( "rendering-parameter", QString() );
508
509 const QDomElement catsElem = elem.firstChildElement( u"categories"_s );
510 if ( !catsElem.isNull() )
511 {
512 mCategoriesList.clear();
513 QDomElement catElem = catsElem.firstChildElement();
514 while ( !catElem.isNull() )
515 {
516 if ( catElem.tagName() == "category"_L1 )
517 {
518 const int value = catElem.attribute( u"value"_s ).toInt();
519 const double size = catElem.attribute( u"pointSize"_s, u"0"_s ).toDouble();
520 const QString label = catElem.attribute( u"label"_s );
521 const bool render = catElem.attribute( u"render"_s ) != "false"_L1;
522 const QColor color = QgsColorUtils::colorFromString( catElem.attribute( u"color"_s ) );
523 mCategoriesList.append( QgsPointCloudCategory( value, color, label, render, size ) );
524 }
525 catElem = catElem.nextSiblingElement();
526 }
527 }
528}
529
531{
532 return mRenderingParameter;
533}
534
536{
537 mRenderingParameter = attribute;
538}
539
541{
542 mCategoriesList = categories;
543}
544
546{
547 QgsPointCloudCategoryList filteredOut;
548 for ( const QgsPointCloudCategory &category : mCategoriesList )
549 {
550 if ( !category.renderState() )
551 filteredOut.push_back( category );
552 }
553 return filteredOut;
554}
555
556QgsColorRampShader QgsClassificationPointCloud3DSymbol::colorRampShader() const
557{
558 QgsColorRampShader colorRampShader;
561 QList<QgsColorRampShader::ColorRampItem> colorRampItemList;
562 for ( const QgsPointCloudCategory &category : mCategoriesList )
563 {
564 const QColor color = category.color();
565 const QgsColorRampShader::ColorRampItem item( category.value(), color, category.label() );
566 colorRampItemList.push_back( item );
567 }
568 colorRampShader.setColorRampItemList( colorRampItemList );
569 return colorRampShader;
570}
571
572
574{
575 const QgsColorRampShader mColorRampShader = colorRampShader();
576 Qt3DRender::QParameter *renderingStyle = new Qt3DRender::QParameter( "u_renderingStyle", QgsPointCloud3DSymbol::Classification );
577 mat->addParameter( renderingStyle );
578 Qt3DRender::QParameter *pointSizeParameter = new Qt3DRender::QParameter( "u_pointSize", QVariant::fromValue( mPointSize ) );
579 mat->addParameter( pointSizeParameter );
580 // Create the texture to pass the color ramp
581 Qt3DRender::QTexture1D *colorRampTexture = nullptr;
582 if ( mColorRampShader.colorRampItemList().count() > 0 )
583 {
584 colorRampTexture = new Qt3DRender::QTexture1D( mat );
585 colorRampTexture->addTextureImage( new QgsColorRampTexture( mColorRampShader, 1 ) );
586 colorRampTexture->setMinificationFilter( Qt3DRender::QTexture1D::Linear );
587 colorRampTexture->setMagnificationFilter( Qt3DRender::QTexture1D::Linear );
588 // note -- this texture is an exception, we do NOT set it to srgb format as we do NOT want
589 // it linearised before sampling. That is because we need to do the interpolation on the ramp
590 // in SRGB color space. The shader converts the result after sampling the ramp to linear.
591 }
592
593 // Parameters
594 Qt3DRender::QParameter *colorRampTextureParameter = new Qt3DRender::QParameter( "u_colorRampTexture", colorRampTexture );
595 mat->addParameter( colorRampTextureParameter );
596 Qt3DRender::QParameter *colorRampCountParameter = new Qt3DRender::QParameter( "u_colorRampCount", mColorRampShader.colorRampItemList().count() );
597 mat->addParameter( colorRampCountParameter );
598 const Qgis::ShaderInterpolationMethod colorRampType = mColorRampShader.colorRampType();
599 Qt3DRender::QParameter *colorRampTypeParameter = new Qt3DRender::QParameter( "u_colorRampType", static_cast<int>( colorRampType ) );
600 mat->addParameter( colorRampTypeParameter );
601}
ShaderInterpolationMethod
Color ramp shader interpolation methods.
Definition qgis.h:1544
@ Exact
Assigns the color of the exact matching value in the color ramp item list.
Definition qgis.h:1547
@ Continuous
Uses breaks from color palette.
Definition qgis.h:1560
@ UnknownDataType
Unknown or unspecified type.
Definition qgis.h:394
static QColor srgbToLinear(const QColor &color)
Converts a SRGB color to a linear color.
Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
virtual void copyBaseSettings(QgsAbstract3DSymbol *destination) const
Copies base class settings from this object to a destination object.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context) override
void writeXml(QDomElement &elem, const QgsReadWriteContext &context) const override
void fillMaterial(QgsMaterial *material) override SIP_SKIP
Used to fill material object with necessary QParameters (and consequently opengl uniforms).
QString attribute() const
Returns the attribute used to select the color of the point cloud.
void setCategoriesList(const QgsPointCloudCategoryList &categories)
Sets the list of categories of the classification.
QgsPointCloudCategoryList getFilteredOutCategories() const
Gets the list of categories of the classification that should not be rendered.
void setAttribute(const QString &attribute)
Sets the attribute used to select the color of the point cloud.
QString symbolType() const override
Returns a unique string identifier of the symbol type.
QgsClassificationPointCloud3DSymbol * clone() const override SIP_FACTORY
QgsColorRampPointCloud3DSymbol * clone() const override SIP_FACTORY
void readXml(const QDomElement &elem, const QgsReadWriteContext &context) override
void setAttribute(const QString &attribute)
Sets the attribute used to select the color of the point cloud.
void writeXml(QDomElement &elem, const QgsReadWriteContext &context) const override
void setColorRampShaderMinMax(double min, double max)
Sets the minimum and maximum values used when classifying colors in the color ramp shader.
QString attribute() const
Returns the attribute used to select the color of the point cloud.
QString symbolType() const override
Returns a unique string identifier of the symbol type.
QgsColorRampShader colorRampShader() const
Returns the color ramp shader used to render the color.
void setColorRampShader(const QgsColorRampShader &colorRampShader)
Sets the color ramp shader used to render the point cloud.
void fillMaterial(QgsMaterial *material) override SIP_SKIP
Used to fill material object with necessary QParameters (and consequently opengl uniforms).
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
Qgis::ShaderInterpolationMethod colorRampType() const
Returns the color ramp interpolation method.
void setClassificationMode(Qgis::ShaderClassificationMethod classificationMode)
Sets the classification mode.
QList< QgsColorRampShader::ColorRampItem > colorRampItemList() const
Returns the custom color map.
void setColorRampType(Qgis::ShaderInterpolationMethod colorRampType)
Sets the color ramp interpolation method.
static QColor colorFromString(const QString &string)
Decodes a string into a color value.
static QString colorToString(const QColor &color)
Encodes a color into a string value.
Handles contrast enhancement and clipping.
Base class for all materials used within QGIS 3D views.
Definition qgsmaterial.h:40
bool verticalTriangleFilter() const
Returns whether triangles are filtered by vertical height for rendering.
float verticalFilterThreshold() const
Returns the threshold vertical height value for filtering triangles.
void setVerticalTriangleFilter(bool verticalTriangleFilter)
Sets whether triangles are filtered by vertical height for rendering.
void setHorizontalFilterThreshold(float horizontalFilterThreshold)
Sets the threshold horizontal size value for filtering triangles.
void setRenderAsTriangles(bool asTriangles)
Sets whether points are triangulated to render solid surface.
float horizontalFilterThreshold() const
Returns the threshold horizontal size value for filtering triangles.
void copyBaseSettings(QgsAbstract3DSymbol *destination) const override
bool renderAsTriangles() const
Returns whether points are triangulated to render solid surface.
void setPointSize(float size)
Sets the point size.
void writeBaseXml(QDomElement &elem, const QgsReadWriteContext &context) const
Writes symbol configuration of this class to the given DOM element.
@ Classification
Render the point cloud with classified colors.
@ SingleColor
Render the point cloud with a single color.
@ ColorRamp
Render the point cloud with a color ramp.
@ RgbRendering
Render the RGB colors of the point cloud.
void setHorizontalTriangleFilter(bool horizontalTriangleFilter)
Sets whether whether triangles are filtered by horizontal size for rendering.
bool horizontalTriangleFilter() const
Returns whether triangles are filtered by horizontal size for rendering.
void readBaseXml(const QDomElement &elem, const QgsReadWriteContext &context)
Reads symbol configuration of this class from the given DOM element.
void setVerticalFilterThreshold(float verticalFilterThreshold)
Sets the threshold vertical height value for filtering triangles.
Represents an individual category (class) from a QgsPointCloudClassifiedRenderer.
A container for the context for various read/write operations on objects.
QString blueAttribute() const
Returns the attribute to use for the blue channel.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context) override
void setBlueAttribute(const QString &attribute)
Sets the attribute to use for the blue channel.
void setGreenContrastEnhancement(QgsContrastEnhancement *enhancement SIP_TRANSFER)
Sets the contrast enhancement to use for the green channel.
QString greenAttribute() const
Returns the attribute to use for the green channel.
QgsContrastEnhancement * blueContrastEnhancement()
Returns the contrast enhancement to use for the blue channel.
void setGreenAttribute(const QString &attribute)
Sets the attribute to use for the green channel.
QString redAttribute() const
Returns the attribute to use for the red channel.
void setBlueContrastEnhancement(QgsContrastEnhancement *enhancement SIP_TRANSFER)
Sets the contrast enhancement to use for the blue channel.
QgsContrastEnhancement * greenContrastEnhancement()
Returns the contrast enhancement to use for the green channel.
QgsContrastEnhancement * redContrastEnhancement()
Returns the contrast enhancement to use for the red channel.
void setRedContrastEnhancement(QgsContrastEnhancement *enhancement SIP_TRANSFER)
Sets the contrast enhancement to use for the red channel.
QString symbolType() const override
Returns a unique string identifier of the symbol type.
QgsRgbPointCloud3DSymbol * clone() const override SIP_FACTORY
void writeXml(QDomElement &elem, const QgsReadWriteContext &context) const override
void fillMaterial(QgsMaterial *material) override SIP_SKIP
Used to fill material object with necessary QParameters (and consequently opengl uniforms).
void setRedAttribute(const QString &attribute)
Sets the attribute to use for the red channel.
QString symbolType() const override
Returns a unique string identifier of the symbol type.
void fillMaterial(QgsMaterial *material) override SIP_SKIP
Used to fill material object with necessary QParameters (and consequently opengl uniforms).
void readXml(const QDomElement &elem, const QgsReadWriteContext &context) override
void writeXml(QDomElement &elem, const QgsReadWriteContext &context) const override
QgsSingleColorPointCloud3DSymbol * clone() const override SIP_FACTORY
void setSingleColor(QColor color)
Sets the color used by the renderer when using SingleColor rendering mode.
QList< QgsPointCloudCategory > QgsPointCloudCategoryList