Class: QgsPolygon3DSymbol¶
- class qgis.3d.QgsPolygon3DSymbol¶
Bases:
QgsAbstract3DSymbol
Constructor for QgsPolygon3DSymbol
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.
New in version 3.0:
Methods
Returns whether also triangles facing the other side will be created.
Returns method that determines how altitude is bound to individual vertices
Returns method that determines altitude (whether to clamp to feature to terrain)
- rtype
QgsAbstract3DSymbol
- rtype
object
Copies base class settings from this object to a
destination
object.Creates a new QgsPolygon3DSymbol.
Returns front/back culling mode
Returns edge lines color
Returns width of edge lines (in pixels)
Returns whether edge highlighting is enabled
Returns extrusion height (in map units)
Returns height (altitude) of the symbol (in map units)
Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)
Returns material used for shading of the symbol
- param elem
Returns which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs, 3 for WallsAndRoofs)
Sets whether also triangles facing the other side will be created.
Sets method that determines how altitude is bound to individual vertices
Sets method that determines altitude (whether to clamp to feature to terrain)
Sets front/back culling mode
Sets edge lines color
Sets width of edge lines (in pixels)
Sets whether edge highlighting is enabled
Sets extrusion height (in map units)
Sets height (altitude) of the symbol (in map units)
Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)
Sets the
material
settings used for shading of the symbol.Sets which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs, 3 for WallsAndRoofs)
- rtype
str
- param elem
- addBackFaces(self) bool ¶
Returns whether also triangles facing the other side will be created. Useful if input data have inconsistent order of vertices
New in version 3.2.
- Return type
bool
- altitudeBinding(self) Qgs3DTypes.AltitudeBinding ¶
Returns method that determines how altitude is bound to individual vertices
- Return type
- altitudeClamping(self) Qgs3DTypes.AltitudeClamping ¶
Returns method that determines altitude (whether to clamp to feature to terrain)
- Return type
- clone(self) QgsAbstract3DSymbol ¶
- Return type
- compatibleGeometryTypes(self) object ¶
- Return type
object
- copyBaseSettings(self, destination: QgsAbstract3DSymbol)¶
Copies base class settings from this object to a
destination
object.
- create() QgsAbstract3DSymbol ¶
Creates a new QgsPolygon3DSymbol.
Caller takes ownership of the returned symbol.
- Return type
- cullingMode(self) Qgs3DTypes.CullingMode ¶
Returns front/back culling mode
- Return type
- edgeColor(self) QColor ¶
Returns edge lines color
New in version 3.8.
- Return type
QColor
- edgeWidth(self) float ¶
Returns width of edge lines (in pixels)
New in version 3.8.
- Return type
float
- edgesEnabled(self) bool ¶
Returns whether edge highlighting is enabled
New in version 3.8.
- Return type
bool
- extrusionHeight(self) float ¶
Returns extrusion height (in map units)
- Return type
float
- height(self) float ¶
Returns height (altitude) of the symbol (in map units)
- Return type
float
- invertNormals(self) bool ¶
Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)
- Return type
bool
- material(self) QgsAbstractMaterialSettings ¶
Returns material used for shading of the symbol
- Return type
- readXml(self, elem: QDomElement, context: QgsReadWriteContext)¶
- Parameters
elem (QDomElement) –
context (QgsReadWriteContext) –
- renderedFacade(self) int ¶
Returns which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs, 3 for WallsAndRoofs)
New in version 3.16.
- Return type
int
- setAddBackFaces(self, add: bool)¶
Sets whether also triangles facing the other side will be created. Useful if input data have inconsistent order of vertices
New in version 3.2.
- Parameters
add (bool) –
- setAltitudeBinding(self, altBinding: Qgs3DTypes.AltitudeBinding)¶
Sets method that determines how altitude is bound to individual vertices
- Parameters
altBinding (Qgs3DTypes.AltitudeBinding) –
- setAltitudeClamping(self, altClamping: Qgs3DTypes.AltitudeClamping)¶
Sets method that determines altitude (whether to clamp to feature to terrain)
- Parameters
altClamping (Qgs3DTypes.AltitudeClamping) –
- setCullingMode(self, mode: Qgs3DTypes.CullingMode)¶
Sets front/back culling mode
- Parameters
mode (Qgs3DTypes.CullingMode) –
- setEdgeColor(self, color: Union[QColor, Qt.GlobalColor])¶
Sets edge lines color
New in version 3.8.
- Parameters
color (Union[QColor) –
- setEdgeWidth(self, width: float)¶
Sets width of edge lines (in pixels)
New in version 3.8.
- Parameters
width (float) –
- setEdgesEnabled(self, enabled: bool)¶
Sets whether edge highlighting is enabled
New in version 3.8.
- Parameters
enabled (bool) –
- setExtrusionHeight(self, extrusionHeight: float)¶
Sets extrusion height (in map units)
- Parameters
extrusionHeight (float) –
- setHeight(self, height: float)¶
Sets height (altitude) of the symbol (in map units)
- Parameters
height (float) –
- setInvertNormals(self, invert: bool)¶
Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)
- Parameters
invert (bool) –
- setMaterial(self, material: QgsAbstractMaterialSettings)¶
Sets the
material
settings used for shading of the symbol.Ownership of
material
is transferred to the symbol.- Parameters
material (QgsAbstractMaterialSettings) –
- setRenderedFacade(self, side: int)¶
Sets which facade of the buildings is rendered (0 for None, 1 for Walls, 2 for Roofs, 3 for WallsAndRoofs)
New in version 3.16.
- Parameters
side (int) –
- type(self) str ¶
- Return type
str
- writeXml(self, elem: QDomElement, context: QgsReadWriteContext)¶
- Parameters
elem (QDomElement) –
context (QgsReadWriteContext) –