Class: QgsMesh3DSymbol¶
3D symbol that draws mesh geometry as planar triangles.
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.
Added in version 3.6.
Class Hierarchy¶
Base classes¶
Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects. |
Enums
How to render the color of the mesh |
|
How to render the Z value of the mesh |
Methods
Returns whether also triangles facing the other side will be created. |
|
Returns method that determines altitude (whether to clamp to feature to terrain) |
|
Returns if arrows are enabled for 3D rendering |
|
Returns if the arrow size is fixed |
|
Returns the arrow spacing |
|
Returns the color ramp shader used to render the color |
|
Returns culling mode |
|
Returns height (altitude) of the symbol (in map units) |
|
Returns if the 3d rendering is enabled |
|
Returns if the vertical component of the mesh is relative to the mesh vertices Z value |
|
Returns the index of the level of detail of the mesh that is the position of the simplified mesh that will be rendered (0 is the original mesh) |
|
Returns material settings used for shading of the symbol |
|
Returns the maximum texture size supported by the hardware Used to store the GL_MAX_TEXTURE_SIZE value that comes from the 3D engine before creating the entity |
|
Returns the rendering style |
|
Sets whether also triangles facing the other side will be created. |
|
Sets method that determines altitude (whether to clamp to feature to terrain) |
|
Sets if arrows are enabled for 3D rendering |
|
Sets if the arrow size is fixed |
|
Sets the arrow spacing |
|
Sets the color ramp shader used to render the color |
|
Sets culling mode |
|
Sets if the 3d rendering is enabled |
|
Sets height (altitude) of the symbol (in map units) |
|
Sets if the vertical component of the mesh is relative to the mesh vertices Z value |
|
Returns the index of the level of detail of the mesh that is the position of the simplified mesh that will be rendered (0 is the original mesh) |
|
Sets the material settings used for shading of the symbol. |
|
Sets the maximum texture size supported by the hardware Used to store the GL_MAX_TEXTURE_SIZE value that comes from the 3D engine before creating the entity |
|
Sets the rendering style |
|
Sets the single color |
|
Sets if the mesh triangles have to been smoothed |
|
Sets the index of the dataset group that will be used to render the vertical component of the 3D mesh geometry |
|
Sets mesh vertical scale |
|
Sets if the mesh wireframe |
|
Sets wireframe line color |
|
Sets wireframe line width |
|
Returns the single color |
|
Returns if mesh triangle are smoothed |
|
Returns the index of the dataset group that will be used to render the vertical component of the 3D mesh geometry |
|
Returns mesh vertical scale |
|
Returns if the mesh wireframe |
|
Returns wireframe line color |
|
Returns wireframe line width |
- class qgis._3d.QgsMesh3DSymbol[source]¶
Bases:
QgsAbstract3DSymbol
- __init__()
Constructor for QgsMesh3DSymbol
- class RenderingStyle(*values)¶
Bases:
IntEnum
How to render the color of the mesh
Added in version 3.12.
SingleColor
: Render the mesh with a single colorColorRamp
: Render the mesh with a color rampColorRamp2DRendering
: Render the mesh with the color ramp shader of the 2D rendering
- ColorRamp = 1¶
- ColorRamp2DRendering = 2¶
- SingleColor = 0¶
- class ZValueType(*values)¶
Bases:
IntEnum
How to render the Z value of the mesh
Added in version 3.14.
VerticesZValue
: Use the Z value of the verticesScalarDatasetZvalue
: Use the value from a dataset (for example, water surface value)
- ScalarDatasetZvalue = 1¶
- VerticesZValue = 0¶
- addBackFaces(self) bool [source]¶
Returns whether also triangles facing the other side will be created. Useful if input data have inconsistent order of vertices
- Return type:
bool
- altitudeClamping(self) Qgis.AltitudeClamping [source]¶
Returns method that determines altitude (whether to clamp to feature to terrain)
- Return type:
- arrowsEnabled(self) bool [source]¶
Returns if arrows are enabled for 3D rendering
Added in version 3.14.
- Return type:
bool
- arrowsFixedSize(self) bool [source]¶
Returns if the arrow size is fixed
Added in version 3.14.
- Return type:
bool
- arrowsSpacing(self) float [source]¶
Returns the arrow spacing
Added in version 3.14.
- Return type:
float
- colorRampShader(self) QgsColorRampShader [source]¶
Returns the color ramp shader used to render the color
Added in version 3.12.
- Return type:
- cullingMode(self) Qgs3DTypes.CullingMode [source]¶
Returns culling mode
Added in version 3.34.
- Return type:
- height(self) float [source]¶
Returns height (altitude) of the symbol (in map units)
- Return type:
float
- isEnabled(self) bool [source]¶
Returns if the 3d rendering is enabled
Added in version 3.14.
- Return type:
bool
- isVerticalMagnitudeRelative(self) bool [source]¶
Returns if the vertical component of the mesh is relative to the mesh vertices Z value
Added in version 3.14.
- Return type:
bool
- levelOfDetailIndex(self) int [source]¶
Returns the index of the level of detail of the mesh that is the position of the simplified mesh that will be rendered (0 is the original mesh)
See also
QgsMeshSimplificationSettings
Added in version 3.18.
- Return type:
int
- materialSettings(self) QgsAbstractMaterialSettings | None [source]¶
Returns material settings used for shading of the symbol
- Return type:
Optional[QgsAbstractMaterialSettings]
- maximumTextureSize(self) int [source]¶
Returns the maximum texture size supported by the hardware Used to store the GL_MAX_TEXTURE_SIZE value that comes from the 3D engine before creating the entity
Added in version 3.14.
- Return type:
int
- renderingStyle(self) QgsMesh3DSymbol.RenderingStyle [source]¶
Returns the rendering style
Added in version 3.12.
- Return type:
- setAddBackFaces(self, add: bool)[source]¶
Sets whether also triangles facing the other side will be created. Useful if input data have inconsistent order of vertices
- Parameters:
add (bool)
- setAltitudeClamping(self, altClamping: Qgis.AltitudeClamping)[source]¶
Sets method that determines altitude (whether to clamp to feature to terrain)
- Parameters:
altClamping (Qgis.AltitudeClamping)
- setArrowsEnabled(self, arrowsEnabled: bool)[source]¶
Sets if arrows are enabled for 3D rendering
Added in version 3.14.
- Parameters:
arrowsEnabled (bool)
- setArrowsFixedSize(self, arrowsFixedSize: bool)[source]¶
Sets if the arrow size is fixed
Added in version 3.14.
- Parameters:
arrowsFixedSize (bool)
- setArrowsSpacing(self, arrowsSpacing: float)[source]¶
Sets the arrow spacing
Added in version 3.14.
- Parameters:
arrowsSpacing (float)
- setColorRampShader(self, colorRampShader: QgsColorRampShader)[source]¶
Sets the color ramp shader used to render the color
Added in version 3.12.
- Parameters:
colorRampShader (QgsColorRampShader)
- setCullingMode(self, mode: Qgs3DTypes.CullingMode)[source]¶
Sets culling mode
Added in version 3.34.
- Parameters:
mode (Qgs3DTypes.CullingMode)
- setEnabled(self, enabled: bool)[source]¶
Sets if the 3d rendering is enabled
Added in version 3.14.
- Parameters:
enabled (bool)
- setHeight(self, height: float)[source]¶
Sets height (altitude) of the symbol (in map units)
- Parameters:
height (float)
- setIsVerticalMagnitudeRelative(self, isVerticalMagnitudeRelative: bool)[source]¶
Sets if the vertical component of the mesh is relative to the mesh vertices Z value
Added in version 3.14.
- Parameters:
isVerticalMagnitudeRelative (bool)
- setLevelOfDetailIndex(self, lod: int)[source]¶
Returns the index of the level of detail of the mesh that is the position of the simplified mesh that will be rendered (0 is the original mesh)
See also
QgsMeshSimplificationSettings
Added in version 3.18.
- Parameters:
lod (int)
- 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])
- setMaximumTextureSize(self, maximumTextureSize: int)[source]¶
Sets the maximum texture size supported by the hardware Used to store the GL_MAX_TEXTURE_SIZE value that comes from the 3D engine before creating the entity
Added in version 3.14.
- Parameters:
maximumTextureSize (int)
- setRenderingStyle(self, textureType: QgsMesh3DSymbol.RenderingStyle)[source]¶
Sets the rendering style
Added in version 3.12.
- Parameters:
textureType (QgsMesh3DSymbol.RenderingStyle)
- setSingleMeshColor(self, singleMeshColor: QColor | Qt.GlobalColor)[source]¶
Sets the single color
Added in version 3.12.
- Parameters:
singleMeshColor (Union[QColor, Qt.GlobalColor])
- setSmoothedTriangles(self, smoothTriangles: bool)[source]¶
Sets if the mesh triangles have to been smoothed
Added in version 3.12.
- Parameters:
smoothTriangles (bool)
- setVerticalDatasetGroupIndex(self, verticalDatasetGroupIndex: int)[source]¶
Sets the index of the dataset group that will be used to render the vertical component of the 3D mesh geometry
Added in version 3.14.
- Parameters:
verticalDatasetGroupIndex (int)
- setVerticalScale(self, verticalScale: float)[source]¶
Sets mesh vertical scale
Added in version 3.12.
- Parameters:
verticalScale (float)
- setWireframeEnabled(self, wireframeEnabled: bool)[source]¶
Sets if the mesh wireframe
Added in version 3.12.
- Parameters:
wireframeEnabled (bool)
- setWireframeLineColor(self, wireframeLineColor: QColor | Qt.GlobalColor)[source]¶
Sets wireframe line color
Added in version 3.12.
- Parameters:
wireframeLineColor (Union[QColor, Qt.GlobalColor])
- setWireframeLineWidth(self, wireframeLineWidth: float)[source]¶
Sets wireframe line width
Added in version 3.12.
- Parameters:
wireframeLineWidth (float)
- singleMeshColor(self) QColor [source]¶
Returns the single color
Added in version 3.12.
- Return type:
QColor
- smoothedTriangles(self) bool [source]¶
Returns if mesh triangle are smoothed
Added in version 3.12.
- Return type:
bool
- verticalDatasetGroupIndex(self) int [source]¶
Returns the index of the dataset group that will be used to render the vertical component of the 3D mesh geometry
Added in version 3.14.
- Return type:
int
- verticalScale(self) float [source]¶
Returns mesh vertical scale
Added in version 3.12.
- Return type:
float
- wireframeEnabled(self) bool [source]¶
Returns if the mesh wireframe
Added in version 3.12.
- Return type:
bool