16#ifndef QGSPOINTCLOUD3DSYMBOL_H
17#define QGSPOINTCLOUD3DSYMBOL_H
29using namespace Qt::StringLiterals;
63 QString
type()
const override {
return "pointcloud"; }
81 void setPointSize(
float size );
231 void setSingleColor( QColor color );
233 unsigned int byteStride()
override {
return 3 *
sizeof( float ); }
238 QColor mSingleColor = QColor( 0, 0, 255 );
302 void setColorRampShaderMinMax(
double min,
double max );
304 unsigned int byteStride()
override {
return 4 *
sizeof( float ); }
308 QString mRenderingParameter;
310 double mColorRampShaderMin = 0.0;
311 double mColorRampShaderMax = 1.0;
340 unsigned int byteStride()
override {
return 6 *
sizeof( float ); }
350 QString redAttribute()
const;
359 void setRedAttribute(
const QString &attribute );
368 QString greenAttribute()
const;
377 void setGreenAttribute(
const QString &attribute );
386 QString blueAttribute()
const;
395 void setBlueAttribute(
const QString &attribute );
462 QString mRedAttribute = u
"Red"_s;
463 QString mGreenAttribute = u
"Green"_s;
464 QString mBlueAttribute = u
"Blue"_s;
466 std::unique_ptr<QgsContrastEnhancement> mRedContrastEnhancement;
467 std::unique_ptr<QgsContrastEnhancement> mGreenContrastEnhancement;
468 std::unique_ptr<QgsContrastEnhancement> mBlueContrastEnhancement;
522 unsigned int byteStride()
override {
return 5 *
sizeof( float ); }
526 QString mRenderingParameter;
Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
virtual void setMaterialSettings(QgsAbstractMaterialSettings *materialSettings)=0
Sets the material settings used for shading of the symbol.
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.
Abstract base class for material settings.
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.
QString attribute() const
Returns the attribute used to select the color of the point cloud.
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()
double colorRampShaderMin() const
Returns the minimum value used when classifying colors in the color ramp shader.
void setAttribute(const QString &attribute)
Sets the attribute used to select the color of the point cloud.
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.
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.
void setColorRampShader(const QgsColorRampShader &colorRampShader)
Sets the color ramp shader used to render the point cloud.
QgsColorRampPointCloud3DSymbol()
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
Handles contrast enhancement and clipping.
Base class for all materials used within QGIS 3D views.
3D symbol that draws point cloud geometries as 3D objects.
virtual void fillMaterial(QgsMaterial *material) SIP_SKIP=0
Used to fill material object with necessary QParameters (and consequently opengl uniforms).
bool verticalTriangleFilter() const
Returns whether triangles are filtered by vertical height for rendering.
float mVerticalFilterThreshold
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.
virtual unsigned int byteStride()=0
Returns the byte stride for the geometries used to for the vertex buffer.
float horizontalFilterThreshold() const
Returns the threshold horizontal size value for filtering triangles.
QgsPointCloud3DSymbol * clone() const override=0SIP_FACTORY
virtual QString symbolType() const =0
Returns a unique string identifier of the symbol type.
float mHorizontalFilterThreshold
bool renderAsTriangles() const
Returns whether points are triangulated to render solid surface.
bool mHorizontalTriangleFilter
float pointSize() const
Returns the point size of the point cloud.
void writeBaseXml(QDomElement &elem, const QgsReadWriteContext &context) const
Writes symbol configuration of this class to the given DOM element.
bool mVerticalTriangleFilter
RenderingStyle
How to render the point cloud.
@ 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.
QString type() const override
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.
A container for the context for various read/write operations on objects.
3D symbol that draws point cloud geometries as 3D objects using RGB colors in the dataset.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context) override
QgsRgbPointCloud3DSymbol()
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.
QString symbolType() const override
Returns a unique string identifier of the symbol type.
void writeXml(QDomElement &elem, const QgsReadWriteContext &context) const override
QString symbolType() const override
Returns a unique string identifier of the symbol type.
unsigned int byteStride() override
Returns the byte stride for the geometries used to for the vertex buffer.
QgsSingleColorPointCloud3DSymbol()
QColor singleColor() const
Returns the color used by the renderer when using SingleColor rendering mode.
QList< QgsPointCloudCategory > QgsPointCloudCategoryList