16#ifndef QGSPOINTCLOUD3DSYMBOL_H
17#define QGSPOINTCLOUD3DSYMBOL_H
21#include <Qt3DRender/QMaterial>
62 QString
type()
const override {
return "pointcloud"; }
79 void setPointSize(
float size );
91 bool renderAsTriangles()
const;
98 void setRenderAsTriangles(
bool asTriangles );
106 bool horizontalTriangleFilter()
const;
114 void setHorizontalTriangleFilter(
bool horizontalTriangleFilter );
122 float horizontalFilterThreshold()
const;
130 void setHorizontalFilterThreshold(
float horizontalFilterThreshold );
138 bool verticalTriangleFilter()
const;
146 void setVerticalTriangleFilter(
bool verticalTriangleFilter );
154 float verticalFilterThreshold()
const;
162 void setVerticalFilterThreshold(
float verticalFilterThreshold );
167 float mPointSize = 3.0;
168 bool mRenderAsTriangles =
false;
169 bool mHorizontalTriangleFilter =
false;
170 float mHorizontalFilterThreshold = 10.0;
171 bool mVerticalTriangleFilter =
false;
172 float mVerticalFilterThreshold = 10.0;
203 QString symbolType()
const override;
219 void setSingleColor( QColor color );
221 unsigned int byteStride()
override {
return 3 *
sizeof( float ); }
222 void fillMaterial( Qt3DRender::QMaterial *material )
override SIP_SKIP;
226 QColor mSingleColor = QColor( 0, 0, 255 );
244 QString symbolType()
const override;
253 QString attribute()
const;
259 void setAttribute(
const QString &attribute );
289 void setColorRampShaderMinMax(
double min,
double max );
291 unsigned int byteStride()
override {
return 4 *
sizeof( float ); }
292 void fillMaterial( Qt3DRender::QMaterial *material )
override SIP_SKIP;
295 QString mRenderingParameter;
297 double mColorRampShaderMin = 0.0;
298 double mColorRampShaderMax = 1.0;
321 QString symbolType()
const override;
327 unsigned int byteStride()
override {
return 6 *
sizeof( float ); }
328 void fillMaterial( Qt3DRender::QMaterial *material )
override SIP_SKIP;
337 QString redAttribute()
const;
346 void setRedAttribute(
const QString &attribute );
355 QString greenAttribute()
const;
364 void setGreenAttribute(
const QString &attribute );
373 QString blueAttribute()
const;
382 void setBlueAttribute(
const QString &attribute );
450 QString mRedAttribute = QStringLiteral(
"Red" );
451 QString mGreenAttribute = QStringLiteral(
"Green" );
452 QString mBlueAttribute = QStringLiteral(
"Blue" );
454 std::unique_ptr< QgsContrastEnhancement > mRedContrastEnhancement;
455 std::unique_ptr< QgsContrastEnhancement > mGreenContrastEnhancement;
456 std::unique_ptr< QgsContrastEnhancement > mBlueContrastEnhancement;
475 QString symbolType()
const override;
484 QString attribute()
const;
490 void setAttribute(
const QString &attribute );
510 unsigned int byteStride()
override {
return 5 *
sizeof( float ); }
511 void fillMaterial( Qt3DRender::QMaterial *material )
override SIP_SKIP;
514 QString mRenderingParameter;
virtual void copyBaseSettings(QgsAbstract3DSymbol *destination) const
Copies base class settings from this object to a destination object.
virtual void readXml(const QDomElement &elem, const QgsReadWriteContext &context)=0
Reads symbol configuration from the given DOM element.
virtual QgsAbstract3DSymbol * clone() const =0
Returns a new instance of the symbol with the same settings.
virtual void writeXml(QDomElement &elem, const QgsReadWriteContext &context) const =0
Writes symbol configuration to the given DOM element.
QgsPointCloudCategoryList categoriesList() const
Returns the list of categories of the classification.
unsigned int byteStride() override
Returns the byte stride for the geometries used to for the vertex buffer.
double colorRampShaderMin() const
Returns the minimum value used when classifying colors in the color ramp shader.
double colorRampShaderMax() const
Returns the maximum value used when classifying colors in the color ramp shader.
unsigned int byteStride() override
Returns the byte stride for the geometries used to for the vertex buffer.
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
Manipulates raster or point cloud pixel values so that they enhanceContrast or clip into a specified ...
virtual unsigned int byteStride()=0
Returns the byte stride for the geometries used to for the vertex buffer.
virtual QString symbolType() const =0
Returns a unique string identifier of the symbol type.
virtual void fillMaterial(Qt3DRender::QMaterial *material)=0SIP_SKIP
Used to fill material object with necessary QParameters (and consequently opengl uniforms)
float pointSize() const
Returns the point size of the point cloud.
RenderingStyle
How to render the point cloud.
@ 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.
QString type() const override
The class is used as a container of context for various read/write operations on other objects.
QgsRgbPointCloud3DSymbol(const QgsRgbPointCloud3DSymbol &other)=delete
QgsRgbPointCloud3DSymbol cannot be copied - use clone() instead.
QgsRgbPointCloud3DSymbol & operator=(const QgsRgbPointCloud3DSymbol &other)=delete
QgsRgbPointCloud3DSymbol cannot be copied - use clone() instead.
unsigned int byteStride() override
Returns the byte stride for the geometries used to for the vertex buffer.
QColor singleColor() const
Returns the color used by the renderer when using SingleColor rendering mode.
QList< QgsPointCloudCategory > QgsPointCloudCategoryList