QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Public Member Functions | Static Public Member Functions | List of all members
QgsPolygon3DSymbol Class Reference

3 More...

#include <qgspolygon3dsymbol.h>

Inheritance diagram for QgsPolygon3DSymbol:
Inheritance graph
[legend]

Public Member Functions

 QgsPolygon3DSymbol ()
 Constructor for QgsPolygon3DSymbol. More...
 
 ~QgsPolygon3DSymbol () override
 
bool addBackFaces () const
 Returns whether also triangles facing the other side will be created. More...
 
Qgis::AltitudeBinding altitudeBinding () const
 Returns method that determines how altitude is bound to individual vertices. More...
 
Qgis::AltitudeClamping altitudeClamping () const
 Returns method that determines altitude (whether to clamp to feature to terrain) More...
 
QgsAbstract3DSymbolclone () const override SIP_FACTORY
 
QList< Qgis::GeometryTypecompatibleGeometryTypes () const override
 
Qgs3DTypes::CullingMode cullingMode () const
 Returns front/back culling mode. More...
 
QColor edgeColor () const
 Returns edge lines color. More...
 
bool edgesEnabled () const
 Returns whether edge highlighting is enabled. More...
 
float edgeWidth () const
 Returns width of edge lines (in pixels) More...
 
bool exportGeometries (Qgs3DSceneExporter *exporter, Qt3DCore::QEntity *entity, const QString &objectNamePrefix) const override SIP_SKIP
 Exports the geometries contained within the hierarchy of entity. More...
 
float extrusionHeight () const
 Returns extrusion height (in map units) More...
 
Q_DECL_DEPRECATED float height () const SIP_DEPRECATED
 Returns height (altitude) of the symbol (in map units) More...
 
bool invertNormals () const
 Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders) More...
 
QgsAbstractMaterialSettingsmaterialSettings () const
 Returns material settings used for shading of the symbol. More...
 
float offset () const
 Returns vertical offset of the symbol (in map units) More...
 
void readXml (const QDomElement &elem, const QgsReadWriteContext &context) override
 
int renderedFacade () const
 Returns which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs, 3 for WallsAndRoofs) More...
 
void setAddBackFaces (bool add)
 Sets whether also triangles facing the other side will be created. More...
 
void setAltitudeBinding (Qgis::AltitudeBinding altBinding)
 Sets method that determines how altitude is bound to individual vertices. More...
 
void setAltitudeClamping (Qgis::AltitudeClamping altClamping)
 Sets method that determines altitude (whether to clamp to feature to terrain) More...
 
void setCullingMode (Qgs3DTypes::CullingMode mode)
 Sets front/back culling mode. More...
 
void setDefaultPropertiesFromLayer (const QgsVectorLayer *layer) override
 
void setEdgeColor (const QColor &color)
 Sets edge lines color. More...
 
void setEdgesEnabled (bool enabled)
 Sets whether edge highlighting is enabled. More...
 
void setEdgeWidth (float width)
 Sets width of edge lines (in pixels) More...
 
void setExtrusionHeight (float extrusionHeight)
 Sets extrusion height (in map units) More...
 
Q_DECL_DEPRECATED void setHeight (float height) SIP_DEPRECATED
 Sets height (altitude) of the symbol (in map units) More...
 
void setInvertNormals (bool invert)
 Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders) More...
 
void setMaterialSettings (QgsAbstractMaterialSettings *materialSettings SIP_TRANSFER)
 Sets the material settings used for shading of the symbol. More...
 
void setOffset (float offset)
 Sets vertical offset of the symbol (in map units) More...
 
void setRenderedFacade (int side)
 Sets which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs, 3 for WallsAndRoofs) More...
 
QString type () const override
 
void writeXml (QDomElement &elem, const QgsReadWriteContext &context) const override
 

Static Public Member Functions

static QgsAbstract3DSymbolcreate () SIP_FACTORY
 Creates a new QgsPolygon3DSymbol. More...
 

Detailed Description

3

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

Warning
This is not considered stable API, and may change in future QGIS releases. It is exposed to the Python bindings as a tech preview only.

Definition at line 36 of file qgspolygon3dsymbol.h.

Constructor & Destructor Documentation

◆ QgsPolygon3DSymbol()

QgsPolygon3DSymbol::QgsPolygon3DSymbol ( )

Constructor for QgsPolygon3DSymbol.

Definition at line 29 of file qgspolygon3dsymbol.cpp.

◆ ~QgsPolygon3DSymbol()

QgsPolygon3DSymbol::~QgsPolygon3DSymbol ( )
overridedefault

Member Function Documentation

◆ addBackFaces()

bool QgsPolygon3DSymbol::addBackFaces ( ) const
inline

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

Useful if input data have inconsistent order of vertices

Since
QGIS 3.2

Definition at line 125 of file qgspolygon3dsymbol.h.

◆ altitudeBinding()

Qgis::AltitudeBinding QgsPolygon3DSymbol::altitudeBinding ( ) const
inline

Returns method that determines how altitude is bound to individual vertices.

Definition at line 64 of file qgspolygon3dsymbol.h.

◆ altitudeClamping()

Qgis::AltitudeClamping QgsPolygon3DSymbol::altitudeClamping ( ) const
inline

Returns method that determines altitude (whether to clamp to feature to terrain)

Definition at line 59 of file qgspolygon3dsymbol.h.

◆ clone()

QgsAbstract3DSymbol * QgsPolygon3DSymbol::clone ( ) const
override

Definition at line 37 of file qgspolygon3dsymbol.cpp.

◆ compatibleGeometryTypes()

QList< Qgis::GeometryType > QgsPolygon3DSymbol::compatibleGeometryTypes ( ) const
override

Definition at line 123 of file qgspolygon3dsymbol.cpp.

◆ create()

QgsAbstract3DSymbol * QgsPolygon3DSymbol::create ( )
static

Creates a new QgsPolygon3DSymbol.

Caller takes ownership of the returned symbol.

Definition at line 154 of file qgspolygon3dsymbol.cpp.

◆ cullingMode()

Qgs3DTypes::CullingMode QgsPolygon3DSymbol::cullingMode ( ) const
inline

Returns front/back culling mode.

Definition at line 112 of file qgspolygon3dsymbol.h.

◆ edgeColor()

QColor QgsPolygon3DSymbol::edgeColor ( ) const
inline

Returns edge lines color.

Since
QGIS 3.8

Definition at line 161 of file qgspolygon3dsymbol.h.

◆ edgesEnabled()

bool QgsPolygon3DSymbol::edgesEnabled ( ) const
inline

Returns whether edge highlighting is enabled.

Since
QGIS 3.8

Definition at line 137 of file qgspolygon3dsymbol.h.

◆ edgeWidth()

float QgsPolygon3DSymbol::edgeWidth ( ) const
inline

Returns width of edge lines (in pixels)

Since
QGIS 3.8

Definition at line 149 of file qgspolygon3dsymbol.h.

◆ exportGeometries()

bool QgsPolygon3DSymbol::exportGeometries ( Qgs3DSceneExporter exporter,
Qt3DCore::QEntity *  entity,
const QString &  objectNamePrefix 
) const
override

Exports the geometries contained within the hierarchy of entity.

Returns whether any objects were exported

Since
QGIS 3.16

Definition at line 172 of file qgspolygon3dsymbol.cpp.

◆ extrusionHeight()

float QgsPolygon3DSymbol::extrusionHeight ( ) const
inline

Returns extrusion height (in map units)

Definition at line 97 of file qgspolygon3dsymbol.h.

◆ height()

Q_DECL_DEPRECATED float QgsPolygon3DSymbol::height ( ) const
inline

Returns height (altitude) of the symbol (in map units)

Deprecated:
since QGIS 3.36. Use offset() instead.

Definition at line 73 of file qgspolygon3dsymbol.h.

◆ invertNormals()

bool QgsPolygon3DSymbol::invertNormals ( ) const
inline

Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)

Definition at line 117 of file qgspolygon3dsymbol.h.

◆ materialSettings()

QgsAbstractMaterialSettings * QgsPolygon3DSymbol::materialSettings ( ) const

Returns material settings used for shading of the symbol.

Definition at line 159 of file qgspolygon3dsymbol.cpp.

◆ offset()

float QgsPolygon3DSymbol::offset ( ) const
inline

Returns vertical offset of the symbol (in map units)

Since
QGIS 3.36

Definition at line 87 of file qgspolygon3dsymbol.h.

◆ readXml()

void QgsPolygon3DSymbol::readXml ( const QDomElement &  elem,
const QgsReadWriteContext context 
)
override

Definition at line 89 of file qgspolygon3dsymbol.cpp.

◆ renderedFacade()

int QgsPolygon3DSymbol::renderedFacade ( ) const
inline

Returns which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs, 3 for WallsAndRoofs)

Since
QGIS 3.16

Definition at line 179 of file qgspolygon3dsymbol.h.

◆ setAddBackFaces()

void QgsPolygon3DSymbol::setAddBackFaces ( bool  add)
inline

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

Useful if input data have inconsistent order of vertices

Since
QGIS 3.2

Definition at line 131 of file qgspolygon3dsymbol.h.

◆ setAltitudeBinding()

void QgsPolygon3DSymbol::setAltitudeBinding ( Qgis::AltitudeBinding  altBinding)
inline

Sets method that determines how altitude is bound to individual vertices.

Definition at line 66 of file qgspolygon3dsymbol.h.

◆ setAltitudeClamping()

void QgsPolygon3DSymbol::setAltitudeClamping ( Qgis::AltitudeClamping  altClamping)
inline

Sets method that determines altitude (whether to clamp to feature to terrain)

Definition at line 61 of file qgspolygon3dsymbol.h.

◆ setCullingMode()

void QgsPolygon3DSymbol::setCullingMode ( Qgs3DTypes::CullingMode  mode)
inline

Sets front/back culling mode.

Definition at line 114 of file qgspolygon3dsymbol.h.

◆ setDefaultPropertiesFromLayer()

void QgsPolygon3DSymbol::setDefaultPropertiesFromLayer ( const QgsVectorLayer layer)
override

Definition at line 128 of file qgspolygon3dsymbol.cpp.

◆ setEdgeColor()

void QgsPolygon3DSymbol::setEdgeColor ( const QColor &  color)
inline

Sets edge lines color.

Since
QGIS 3.8

Definition at line 167 of file qgspolygon3dsymbol.h.

◆ setEdgesEnabled()

void QgsPolygon3DSymbol::setEdgesEnabled ( bool  enabled)
inline

Sets whether edge highlighting is enabled.

Since
QGIS 3.8

Definition at line 143 of file qgspolygon3dsymbol.h.

◆ setEdgeWidth()

void QgsPolygon3DSymbol::setEdgeWidth ( float  width)
inline

Sets width of edge lines (in pixels)

Since
QGIS 3.8

Definition at line 155 of file qgspolygon3dsymbol.h.

◆ setExtrusionHeight()

void QgsPolygon3DSymbol::setExtrusionHeight ( float  extrusionHeight)
inline

Sets extrusion height (in map units)

Definition at line 99 of file qgspolygon3dsymbol.h.

◆ setHeight()

Q_DECL_DEPRECATED void QgsPolygon3DSymbol::setHeight ( float  height)
inline

Sets height (altitude) of the symbol (in map units)

Deprecated:
since QGIS 3.36. Use setOffset() instead.

Definition at line 80 of file qgspolygon3dsymbol.h.

◆ setInvertNormals()

void QgsPolygon3DSymbol::setInvertNormals ( bool  invert)
inline

Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)

Definition at line 119 of file qgspolygon3dsymbol.h.

◆ setMaterialSettings()

void QgsPolygon3DSymbol::setMaterialSettings ( QgsAbstractMaterialSettings *materialSettings  SIP_TRANSFER)

Sets the material settings used for shading of the symbol.

Ownership of material is transferred to the symbol.

Definition at line 164 of file qgspolygon3dsymbol.cpp.

◆ setOffset()

void QgsPolygon3DSymbol::setOffset ( float  offset)
inline

Sets vertical offset of the symbol (in map units)

Since
QGIS 3.36

Definition at line 94 of file qgspolygon3dsymbol.h.

◆ setRenderedFacade()

void QgsPolygon3DSymbol::setRenderedFacade ( int  side)
inline

Sets which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs, 3 for WallsAndRoofs)

Since
QGIS 3.16

Definition at line 173 of file qgspolygon3dsymbol.h.

◆ type()

QString QgsPolygon3DSymbol::type ( ) const
inlineoverride

Definition at line 43 of file qgspolygon3dsymbol.h.

◆ writeXml()

void QgsPolygon3DSymbol::writeXml ( QDomElement &  elem,
const QgsReadWriteContext context 
) const
override

Definition at line 56 of file qgspolygon3dsymbol.cpp.


The documentation for this class was generated from the following files: