Class: QgsPolygon3DSymbol¶
-
class
qgis.3d.
QgsPolygon3DSymbol
¶ Bases:
qgis._3d.QgsAbstract3DSymbol
Constructor for QgsPolygon3DSymbol
QgsPolygon3DSymbol(
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.
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
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
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 material used for shading of the symbol
- 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
-
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) → QgsPhongMaterialSettings¶ Returns material used for shading of the symbol
- Return type
-
readXml
(self, elem: QDomElement, context: QgsReadWriteContext)¶ - Parameters
elem (QDomElement) –
context (QgsReadWriteContext) –
-
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: QgsPhongMaterialSettings)¶ Sets material used for shading of the symbol
- Parameters
material (QgsPhongMaterialSettings) –
-
type
(self) → str¶ - Return type
str
-
writeXml
(self, elem: QDomElement, context: QgsReadWriteContext)¶ - Parameters
elem (QDomElement) –
context (QgsReadWriteContext) –