QgsPolygon3DSymbol class

3 3D symbol that draws polygon geometries as planar polygons, optionally extruded (with added walls).

Base classes

class QgsAbstract3DSymbol
3 Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.

Constructors, destructors, conversion operators

QgsPolygon3DSymbol() defaulted
Constructor for QgsPolygon3DSymbol.

Public functions

auto addBackFaces() const -> bool
Returns whether also triangles facing the other side will be created.
auto altitudeBinding() const -> Qgs3DTypes::AltitudeBinding
Returns method that determines how altitude is bound to individual vertices.
auto altitudeClamping() const -> Qgs3DTypes::AltitudeClamping
Returns method that determines altitude (whether to clamp to feature to terrain)
auto clone() const -> QgsAbstract3DSymbol* override
Returns a new instance of the symbol with the same settings.
auto cullingMode() const -> Qgs3DTypes::CullingMode
Returns front/back culling mode.
auto extrusionHeight() const -> float
Returns extrusion height (in map units)
auto height() const -> float
Returns height (altitude) of the symbol (in map units)
auto invertNormals() const -> bool
Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)
auto material() const -> QgsPhongMaterialSettings
Returns material used for shading of the symbol.
void readXml(const QDomElement& elem, const QgsReadWriteContext& context) override
Reads symbol configuration from the given DOM element.
void setAddBackFaces(bool add)
Sets whether also triangles facing the other side will be created.
void setAltitudeBinding(Qgs3DTypes::AltitudeBinding altBinding)
Sets method that determines how altitude is bound to individual vertices.
void setAltitudeClamping(Qgs3DTypes::AltitudeClamping altClamping)
Sets method that determines altitude (whether to clamp to feature to terrain)
void setCullingMode(Qgs3DTypes::CullingMode mode)
Sets front/back culling mode.
void setExtrusionHeight(float extrusionHeight)
Sets extrusion height (in map units)
void setHeight(float height)
Sets height (altitude) of the symbol (in map units)
void setInvertNormals(bool invert)
Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)
void setMaterial(const QgsPhongMaterialSettings& material)
Sets material used for shading of the symbol.
auto type() const -> QString override
Returns identifier of symbol type. Each 3D symbol implementation should return a different type.
void writeXml(QDomElement& elem, const QgsReadWriteContext& context) const override
Writes symbol configuration to the given DOM element.

Function documentation

bool QgsPolygon3DSymbol::addBackFaces() const

Returns whether also triangles facing the other side will be created.

Useful if input data have inconsistent order of vertices

void QgsPolygon3DSymbol::setAddBackFaces(bool add)

Sets whether also triangles facing the other side will be created.

Useful if input data have inconsistent order of vertices