16#ifndef QGSPOLYGON3DSYMBOL_H
17#define QGSPOLYGON3DSYMBOL_H
24#include <Qt3DRender/QCullFace>
44 QString
type()
const override {
return "polygon"; }
49 QList<
QgsWkbTypes::GeometryType > compatibleGeometryTypes() const override;
50 void setDefaultPropertiesFromLayer( const
QgsVectorLayer *layer ) override;
60 Qgis::AltitudeClamping altitudeClamping()
const {
return mAltClamping; }
70 float height()
const {
return mHeight; }
72 void setHeight(
float height ) { mHeight = height; }
172 float mHeight = 0.0f;
173 float mExtrusionHeight = 0.0f;
174 std::unique_ptr< QgsAbstractMaterialSettings > mMaterial;
176 bool mInvertNormals =
false;
177 bool mAddBackFaces =
false;
178 int mRenderedFacade = 3;
180 bool mEdgesEnabled =
false;
181 float mEdgeWidth = 1.f;
182 QColor mEdgeColor = Qt::black;
The Qgis class provides global constants for use throughout the application.
AltitudeClamping
Altitude clamping.
@ Relative
Elevation is relative to terrain height (final elevation = terrain elevation + feature elevation)
AltitudeBinding
Altitude binding.
@ Centroid
Clamp just centroid of feature.
Entity that handles the exporting of 3D scene.
CullingMode
Triangle culling mode.
@ NoCulling
Will render both front and back faces of triangles.
virtual bool exportGeometries(Qgs3DSceneExporter *exporter, Qt3DCore::QEntity *entity, const QString &objectNamePrefix) const
Exports the geometries contained within the hierarchy of entity.
virtual QgsAbstract3DSymbol * clone() const =0
Returns a new instance of the symbol with the same settings.
void setHeight(float height)
Sets height (altitude) of the symbol (in map units)
Qgis::AltitudeBinding altitudeBinding() const
Returns method that determines how altitude is bound to individual vertices.
void setCullingMode(Qgs3DTypes::CullingMode mode)
Sets front/back culling mode.
void setAddBackFaces(bool add)
Sets whether also triangles facing the other side will be created.
QString type() const override
void setExtrusionHeight(float extrusionHeight)
Sets extrusion height (in map units)
void setAltitudeBinding(Qgis::AltitudeBinding altBinding)
Sets method that determines how altitude is bound to individual vertices.
bool invertNormals() const
Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-cloc...
void setRenderedFacade(int side)
Sets which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs,...
float extrusionHeight() const
Returns extrusion height (in map units)
~QgsPolygon3DSymbol() override
Qgs3DTypes::CullingMode cullingMode() const
Returns front/back culling mode.
QColor edgeColor() const
Returns edge lines color.
void setEdgeWidth(float width)
Sets width of edge lines (in pixels)
void setEdgeColor(const QColor &color)
Sets edge lines color.
int renderedFacade() const
Returns which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs,...
void setInvertNormals(bool invert)
Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwi...
bool addBackFaces() const
Returns whether also triangles facing the other side will be created.
bool edgesEnabled() const
Returns whether edge highlighting is enabled.
void setEdgesEnabled(bool enabled)
Sets whether edge highlighting is enabled.
float height() const
Returns height (altitude) of the symbol (in map units)
float edgeWidth() const
Returns width of edge lines (in pixels)
void setAltitudeClamping(Qgis::AltitudeClamping altClamping)
Sets method that determines altitude (whether to clamp to feature to terrain)
The class is used as a container of context for various read/write operations on other objects.
Represents a vector layer which manages a vector based data sets.
Handles storage of information regarding WKB types and their properties.
#define SIP_NODEFAULTCTORS