Class: QgsPoint3DSymbol¶
3D symbol that draws point geometries as 3D objects using one of the predefined shapes.
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.
Class Hierarchy¶
Base classes¶
Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects. |
Enums
alias of |
Methods
Returns method that determines altitude (whether to clamp to feature to terrain) |
|
Returns how much the billboard should be elevated upwards |
|
Returns a symbol for billboard |
|
Returns material settings used for shading of the symbol |
|
Sets method that determines altitude (whether to clamp to feature to terrain) |
|
Set symbol for billboard and the ownership is transferred |
|
Sets the material settings used for shading of the symbol. |
|
Sets 3D shape for points |
|
Sets a key-value dictionary of point shape properties. |
|
Sets transform for individual objects represented by the symbol |
|
Returns 3D shape for points |
|
Returns a key-value dictionary of point shape properties. |
|
Returns the value for a specific shape property. |
|
Returns transform for individual objects represented by the symbol |
Static Methods
Creates a new QgsPoint3DSymbol. |
|
Returns shape enum value from a string |
|
Returns string from a shape enum value |
- class qgis._3d.QgsPoint3DSymbol[source]¶
Bases:
QgsAbstract3DSymbol
- __init__()
Constructor for QgsPoint3DSymbol with default QgsMarkerSymbol as the billboardSymbol
- __init__(other: QgsPoint3DSymbol)
- Parameters:
other (QgsPoint3DSymbol)
- Shape¶
alias of
Point3DShape
- altitudeClamping(self) Qgis.AltitudeClamping [source]¶
Returns method that determines altitude (whether to clamp to feature to terrain)
- Return type:
- billboardHeight(self) float [source]¶
Returns how much the billboard should be elevated upwards
- Return type:
float
- billboardSymbol(self) QgsMarkerSymbol | None [source]¶
Returns a symbol for billboard
- Return type:
Optional[QgsMarkerSymbol]
- static create() QgsAbstract3DSymbol | None [source]¶
Creates a new QgsPoint3DSymbol.
Caller takes ownership of the returned symbol.
- Return type:
Optional[QgsAbstract3DSymbol]
- materialSettings(self) QgsAbstractMaterialSettings | None [source]¶
Returns material settings used for shading of the symbol
- Return type:
Optional[QgsAbstractMaterialSettings]
- setAltitudeClamping(self, altClamping: Qgis.AltitudeClamping)[source]¶
Sets method that determines altitude (whether to clamp to feature to terrain)
- Parameters:
altClamping (Qgis.AltitudeClamping)
- setBillboardSymbol(self, symbol: QgsMarkerSymbol | None)[source]¶
Set symbol for billboard and the ownership is transferred
- Parameters:
symbol (Optional[QgsMarkerSymbol])
- setMaterialSettings(self, materialSettings: QgsAbstractMaterialSettings | None)[source]¶
Sets the
material
settings used for shading of the symbol.Ownership of
material
is transferred to the symbol.- Parameters:
materialSettings (Optional[QgsAbstractMaterialSettings])
- setShape(self, shape: Qgis.Point3DShape)[source]¶
Sets 3D shape for points
- Parameters:
shape (Qgis.Point3DShape)
- setShapeProperties(self, properties: Dict[str, Any])[source]¶
Sets a key-value dictionary of point shape
properties
.The available properties depend on the point
shape()
.Cylinders (
Qgis
.Point3DShape.Cylinder)¶radius
length
Spheres (
Qgis
.Point3DShape.Sphere)¶radius
Cones (
Qgis
.Point3DShape.Cone)¶length
topRadius
bottomRadius
Cubes (
Qgis
.Point3DShape.Cube)¶size
Torus (
Qgis
.Point3DShape.Torus)¶radius
minorRadius
Flat Planes (
Qgis
.Point3DShape.Plane)¶size
Extruded Text (
Qgis
.Point3DShape.ExtrudedText)¶depth
text
(string)
Models (
Qgis
.Point3DShape.Model)¶model
(path to model file)
See also
- param properties:
- type properties:
Dict[str, Any]
- setTransform(self, transform: QMatrix4x4)[source]¶
Sets transform for individual objects represented by the symbol
- Parameters:
transform (QMatrix4x4)
- shape(self) Qgis.Point3DShape [source]¶
Returns 3D shape for points
- Return type:
- static shapeFromString(shape: str | None) Qgis.Point3DShape [source]¶
Returns shape enum value from a string
- Parameters:
shape (Optional[str])
- Return type:
- shapeProperties(self) Dict[str, Any] [source]¶
Returns a key-value dictionary of point shape properties.
In most cases callers should use
shapeProperty()
instead, to correctly handle default values when a property has not been explicitly set.See also
setShapeProperties()
for a description of available properties.See also
- Return type:
Dict[str, Any]
- shapeProperty(self, property: str | None) Any [source]¶
Returns the value for a specific shape
property
.This method accounts for default property values for the symbol’s
shape()
, used when the property has not been explicitly set.See also
setShapeProperties()
for a description of available properties.Added in version 3.36.
- Parameters:
property (Optional[str])
- Return type:
Any
- static shapeToString(shape: Qgis.Point3DShape) str [source]¶
Returns string from a shape enum value
- Parameters:
shape (Qgis.Point3DShape)
- Return type:
str