QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
QgsMesh3DSymbol Class Reference

3 More...

#include <qgsmesh3dsymbol.h>

Inheritance diagram for QgsMesh3DSymbol:
Inheritance graph
[legend]

Public Types

enum class  RenderingStyle : int { SingleColor = 0 , ColorRamp , ColorRamp2DRendering }
 How to render the color of the mesh. More...
 
enum class  ZValueType : int { VerticesZValue = 0 , ScalarDatasetZvalue }
 How to render the Z value of the mesh. More...
 
- Public Types inherited from QgsAbstract3DSymbol
enum class  Property : int { Height = 0 , ExtrusionHeight }
 Data definable properties. More...
 

Public Member Functions

 QgsMesh3DSymbol ()
 Constructor for QgsMesh3DSymbol.
 
 ~QgsMesh3DSymbol () override
 
bool addBackFaces () const
 Returns whether also triangles facing the other side will be created.
 
Qgis::AltitudeClamping altitudeClamping () const
 Returns method that determines altitude (whether to clamp to feature to terrain)
 
bool arrowsEnabled () const
 Returns if arrows are enabled for 3D rendering.
 
bool arrowsFixedSize () const
 Returns if the arrow size is fixed.
 
double arrowsSpacing () const
 Returns the arrow spacing.
 
QgsMesh3DSymbolclone () const override SIP_FACTORY
 Returns a new instance of the symbol with the same settings.
 
QgsColorRampShader colorRampShader () const
 Returns the color ramp shader used to render the color.
 
Qgs3DTypes::CullingMode cullingMode () const
 Returns culling mode.
 
float height () const
 Returns height (altitude) of the symbol (in map units)
 
bool isEnabled () const
 Returns if the 3d rendering is enabled.
 
bool isVerticalMagnitudeRelative () const
 Returns if the vertical component of the mesh is relative to the mesh vertices Z value.
 
int levelOfDetailIndex () const
 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)
 
QgsAbstractMaterialSettingsmaterialSettings () const
 Returns material settings used for shading of the symbol.
 
int maximumTextureSize () const
 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.
 
bool operator!= (const QgsMesh3DSymbol &other) const
 
bool operator== (const QgsMesh3DSymbol &other) const
 
void readXml (const QDomElement &elem, const QgsReadWriteContext &context) override
 Reads symbol configuration from the given DOM element.
 
QgsMesh3DSymbol::RenderingStyle renderingStyle () const
 Returns the rendering style.
 
void setAddBackFaces (bool add)
 Sets whether also triangles facing the other side will be created.
 
void setAltitudeClamping (Qgis::AltitudeClamping altClamping)
 Sets method that determines altitude (whether to clamp to feature to terrain)
 
void setArrowsEnabled (bool arrowsEnabled)
 Sets if arrows are enabled for 3D rendering.
 
void setArrowsFixedSize (bool arrowsFixedSize)
 Sets if the arrow size is fixed.
 
void setArrowsSpacing (double arrowsSpacing)
 Sets the arrow spacing.
 
void setColorRampShader (const QgsColorRampShader &colorRampShader)
 Sets the color ramp shader used to render the color.
 
void setCullingMode (const Qgs3DTypes::CullingMode &mode)
 Sets culling mode.
 
void setEnabled (bool enabled)
 Sets if the 3d rendering is enabled.
 
void setHeight (float height)
 Sets height (altitude) of the symbol (in map units)
 
void setIsVerticalMagnitudeRelative (bool isVerticalMagnitudeRelative)
 Sets if the vertical component of the mesh is relative to the mesh vertices Z value.
 
void setLevelOfDetailIndex (int lod)
 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)
 
void setMaterialSettings (QgsAbstractMaterialSettings *materialSettings SIP_TRANSFER)
 Sets the material settings used for shading of the symbol.
 
void setMaximumTextureSize (int maximumTextureSize)
 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.
 
void setRenderingStyle (const QgsMesh3DSymbol::RenderingStyle &textureType)
 Sets the rendering style.
 
void setSingleMeshColor (const QColor &singleMeshColor)
 Sets the single color.
 
void setSmoothedTriangles (bool smoothTriangles)
 Sets if the mesh triangles have to been smoothed.
 
void setVerticalDatasetGroupIndex (int verticalDatasetGroupIndex)
 Sets the index of the dataset group that will be used to render the vertical component of the 3D mesh geometry.
 
void setVerticalScale (double verticalScale)
 Sets mesh vertical scale.
 
void setWireframeEnabled (bool wireframeEnabled)
 Sets if the mesh wireframe.
 
void setWireframeLineColor (const QColor &wireframeLineColor)
 Sets wireframe line color.
 
void setWireframeLineWidth (double wireframeLineWidth)
 Sets wireframe line width.
 
QColor singleMeshColor () const
 Returns the single color.
 
bool smoothedTriangles () const
 Returns if mesh triangle are smoothed.
 
QString type () const override
 Returns identifier of symbol type. Each 3D symbol implementation should return a different type.
 
int verticalDatasetGroupIndex () const
 Returns the index of the dataset group that will be used to render the vertical component of the 3D mesh geometry.
 
double verticalScale () const
 Returns mesh vertical scale.
 
bool wireframeEnabled () const
 Returns if the mesh wireframe.
 
QColor wireframeLineColor () const
 Returns wireframe line color.
 
double wireframeLineWidth () const
 Returns wireframe line width.
 
void writeXml (QDomElement &elem, const QgsReadWriteContext &context) const override
 Writes symbol configuration to the given DOM element.
 
- Public Member Functions inherited from QgsAbstract3DSymbol
virtual ~QgsAbstract3DSymbol ()=default
 
virtual QList< Qgis::GeometryTypecompatibleGeometryTypes () const
 Returns the list of the vector layer geometry types which are compatible with this symbol.
 
QgsPropertyCollectiondataDefinedProperties ()
 Returns a reference to the symbol layer's property collection, used for data defined overrides.
 
const QgsPropertyCollectiondataDefinedProperties () const
 Returns a reference to the symbol layer's property collection, used for data defined overrides.
 
virtual bool exportGeometries (Qgs3DSceneExporter *exporter, Qt3DCore::QEntity *entity, const QString &objectNamePrefix) const
 Exports the geometries contained within the hierarchy of entity.
 
void setDataDefinedProperties (const QgsPropertyCollection &collection)
 Sets the symbol layer's property collection, used for data defined overrides.
 
virtual void setDefaultPropertiesFromLayer (const QgsVectorLayer *layer)
 Sets default properties for the symbol based on a layer's configuration.
 

Additional Inherited Members

- Static Public Member Functions inherited from QgsAbstract3DSymbol
static const QgsPropertiesDefinitionpropertyDefinitions ()
 Returns the symbol layer property definitions.
 
- Protected Member Functions inherited from QgsAbstract3DSymbol
virtual void copyBaseSettings (QgsAbstract3DSymbol *destination) const
 Copies base class settings from this object to a destination object.
 
- Protected Attributes inherited from QgsAbstract3DSymbol
QgsPropertyCollection mDataDefinedProperties
 

Detailed Description

3

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.
Since
QGIS 3.6

Definition at line 38 of file qgsmesh3dsymbol.h.

Member Enumeration Documentation

◆ RenderingStyle

enum class QgsMesh3DSymbol::RenderingStyle : int
strong

How to render the color of the mesh.

Since
QGIS 3.12
Enumerator
SingleColor 

Render the mesh with a single color.

ColorRamp 

Render the mesh with a color ramp.

ColorRamp2DRendering 

Render the mesh with the color ramp shader of the 2D rendering.

Definition at line 46 of file qgsmesh3dsymbol.h.

◆ ZValueType

enum class QgsMesh3DSymbol::ZValueType : int
strong

How to render the Z value of the mesh.

Since
QGIS 3.14
Enumerator
VerticesZValue 

Use the Z value of the vertices.

ScalarDatasetZvalue 

Use the value from a dataset (for example, water surface value)

Definition at line 58 of file qgsmesh3dsymbol.h.

Constructor & Destructor Documentation

◆ QgsMesh3DSymbol()

QgsMesh3DSymbol::QgsMesh3DSymbol ( )

Constructor for QgsMesh3DSymbol.

Definition at line 22 of file qgsmesh3dsymbol.cpp.

◆ ~QgsMesh3DSymbol()

QgsMesh3DSymbol::~QgsMesh3DSymbol ( )
overridedefault

Member Function Documentation

◆ addBackFaces()

bool QgsMesh3DSymbol::addBackFaces ( ) const
inline

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

Useful if input data have inconsistent order of vertices

Definition at line 125 of file qgsmesh3dsymbol.h.

◆ altitudeClamping()

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

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

Definition at line 103 of file qgsmesh3dsymbol.h.

◆ arrowsEnabled()

bool QgsMesh3DSymbol::arrowsEnabled ( ) const

Returns if arrows are enabled for 3D rendering.

Since
QGIS 3.14

Definition at line 238 of file qgsmesh3dsymbol.cpp.

◆ arrowsFixedSize()

bool QgsMesh3DSymbol::arrowsFixedSize ( ) const

Returns if the arrow size is fixed.

Since
QGIS 3.14

Definition at line 268 of file qgsmesh3dsymbol.cpp.

◆ arrowsSpacing()

double QgsMesh3DSymbol::arrowsSpacing ( ) const

Returns the arrow spacing.

Since
QGIS 3.14

Definition at line 248 of file qgsmesh3dsymbol.cpp.

◆ clone()

QgsMesh3DSymbol * QgsMesh3DSymbol::clone ( ) const
overridevirtual

Returns a new instance of the symbol with the same settings.

Implements QgsAbstract3DSymbol.

Definition at line 29 of file qgsmesh3dsymbol.cpp.

◆ colorRampShader()

QgsColorRampShader QgsMesh3DSymbol::colorRampShader ( ) const

Returns the color ramp shader used to render the color.

Since
QGIS 3.12

Definition at line 188 of file qgsmesh3dsymbol.cpp.

◆ cullingMode()

Qgs3DTypes::CullingMode QgsMesh3DSymbol::cullingMode ( ) const

Returns culling mode.

Since
QGIS 3.34

Definition at line 338 of file qgsmesh3dsymbol.cpp.

◆ height()

float QgsMesh3DSymbol::height ( ) const
inline

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

Definition at line 108 of file qgsmesh3dsymbol.h.

◆ isEnabled()

bool QgsMesh3DSymbol::isEnabled ( ) const

Returns if the 3d rendering is enabled.

Since
QGIS 3.14

Definition at line 328 of file qgsmesh3dsymbol.cpp.

◆ isVerticalMagnitudeRelative()

bool QgsMesh3DSymbol::isVerticalMagnitudeRelative ( ) const

Returns if the vertical component of the mesh is relative to the mesh vertices Z value.

Since
QGIS 3.14

Definition at line 228 of file qgsmesh3dsymbol.cpp.

◆ levelOfDetailIndex()

int QgsMesh3DSymbol::levelOfDetailIndex ( ) const

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
Since
QGIS 3.18

Definition at line 278 of file qgsmesh3dsymbol.cpp.

◆ materialSettings()

QgsAbstractMaterialSettings * QgsMesh3DSymbol::materialSettings ( ) const

Returns material settings used for shading of the symbol.

Definition at line 348 of file qgsmesh3dsymbol.cpp.

◆ maximumTextureSize()

int QgsMesh3DSymbol::maximumTextureSize ( ) const

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.

Since
QGIS 3.14

Definition at line 258 of file qgsmesh3dsymbol.cpp.

◆ operator!=()

bool QgsMesh3DSymbol::operator!= ( const QgsMesh3DSymbol other) const

Definition at line 323 of file qgsmesh3dsymbol.cpp.

◆ operator==()

bool QgsMesh3DSymbol::operator== ( const QgsMesh3DSymbol other) const

Definition at line 288 of file qgsmesh3dsymbol.cpp.

◆ readXml()

void QgsMesh3DSymbol::readXml ( const QDomElement &  elem,
const QgsReadWriteContext context 
)
overridevirtual

Reads symbol configuration from the given DOM element.

Implements QgsAbstract3DSymbol.

Definition at line 101 of file qgsmesh3dsymbol.cpp.

◆ renderingStyle()

QgsMesh3DSymbol::RenderingStyle QgsMesh3DSymbol::renderingStyle ( ) const

Returns the rendering style.

Since
QGIS 3.12

Definition at line 208 of file qgsmesh3dsymbol.cpp.

◆ setAddBackFaces()

void QgsMesh3DSymbol::setAddBackFaces ( bool  add)
inline

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

Useful if input data have inconsistent order of vertices

Definition at line 130 of file qgsmesh3dsymbol.h.

◆ setAltitudeClamping()

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

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

Definition at line 105 of file qgsmesh3dsymbol.h.

◆ setArrowsEnabled()

void QgsMesh3DSymbol::setArrowsEnabled ( bool  arrowsEnabled)

Sets if arrows are enabled for 3D rendering.

Since
QGIS 3.14

Definition at line 243 of file qgsmesh3dsymbol.cpp.

◆ setArrowsFixedSize()

void QgsMesh3DSymbol::setArrowsFixedSize ( bool  arrowsFixedSize)

Sets if the arrow size is fixed.

Since
QGIS 3.14

Definition at line 273 of file qgsmesh3dsymbol.cpp.

◆ setArrowsSpacing()

void QgsMesh3DSymbol::setArrowsSpacing ( double  arrowsSpacing)

Sets the arrow spacing.

Since
QGIS 3.14

Definition at line 253 of file qgsmesh3dsymbol.cpp.

◆ setColorRampShader()

void QgsMesh3DSymbol::setColorRampShader ( const QgsColorRampShader colorRampShader)

Sets the color ramp shader used to render the color.

Since
QGIS 3.12

Definition at line 193 of file qgsmesh3dsymbol.cpp.

◆ setCullingMode()

void QgsMesh3DSymbol::setCullingMode ( const Qgs3DTypes::CullingMode mode)

Sets culling mode.

Since
QGIS 3.34

Definition at line 343 of file qgsmesh3dsymbol.cpp.

◆ setEnabled()

void QgsMesh3DSymbol::setEnabled ( bool  enabled)

Sets if the 3d rendering is enabled.

Since
QGIS 3.14

Definition at line 333 of file qgsmesh3dsymbol.cpp.

◆ setHeight()

void QgsMesh3DSymbol::setHeight ( float  height)
inline

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

Definition at line 110 of file qgsmesh3dsymbol.h.

◆ setIsVerticalMagnitudeRelative()

void QgsMesh3DSymbol::setIsVerticalMagnitudeRelative ( bool  isVerticalMagnitudeRelative)

Sets if the vertical component of the mesh is relative to the mesh vertices Z value.

Since
QGIS 3.14

Definition at line 233 of file qgsmesh3dsymbol.cpp.

◆ setLevelOfDetailIndex()

void QgsMesh3DSymbol::setLevelOfDetailIndex ( int  lod)

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
Since
QGIS 3.18

Definition at line 283 of file qgsmesh3dsymbol.cpp.

◆ setMaterialSettings()

void QgsMesh3DSymbol::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 353 of file qgsmesh3dsymbol.cpp.

◆ setMaximumTextureSize()

void QgsMesh3DSymbol::setMaximumTextureSize ( int  maximumTextureSize)

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.

Since
QGIS 3.14

Definition at line 263 of file qgsmesh3dsymbol.cpp.

◆ setRenderingStyle()

void QgsMesh3DSymbol::setRenderingStyle ( const QgsMesh3DSymbol::RenderingStyle textureType)

Sets the rendering style.

Since
QGIS 3.12

Definition at line 213 of file qgsmesh3dsymbol.cpp.

◆ setSingleMeshColor()

void QgsMesh3DSymbol::setSingleMeshColor ( const QColor &  singleMeshColor)

Sets the single color.

Since
QGIS 3.12

Definition at line 203 of file qgsmesh3dsymbol.cpp.

◆ setSmoothedTriangles()

void QgsMesh3DSymbol::setSmoothedTriangles ( bool  smoothTriangles)

Sets if the mesh triangles have to been smoothed.

Since
QGIS 3.12

Definition at line 143 of file qgsmesh3dsymbol.cpp.

◆ setVerticalDatasetGroupIndex()

void QgsMesh3DSymbol::setVerticalDatasetGroupIndex ( int  verticalDatasetGroupIndex)

Sets the index of the dataset group that will be used to render the vertical component of the 3D mesh geometry.

Since
QGIS 3.14

Definition at line 223 of file qgsmesh3dsymbol.cpp.

◆ setVerticalScale()

void QgsMesh3DSymbol::setVerticalScale ( double  verticalScale)

Sets mesh vertical scale.

Since
QGIS 3.12

Definition at line 183 of file qgsmesh3dsymbol.cpp.

◆ setWireframeEnabled()

void QgsMesh3DSymbol::setWireframeEnabled ( bool  wireframeEnabled)

Sets if the mesh wireframe.

Since
QGIS 3.12

Definition at line 153 of file qgsmesh3dsymbol.cpp.

◆ setWireframeLineColor()

void QgsMesh3DSymbol::setWireframeLineColor ( const QColor &  wireframeLineColor)

Sets wireframe line color.

Since
QGIS 3.12

Definition at line 173 of file qgsmesh3dsymbol.cpp.

◆ setWireframeLineWidth()

void QgsMesh3DSymbol::setWireframeLineWidth ( double  wireframeLineWidth)

Sets wireframe line width.

Since
QGIS 3.12

Definition at line 163 of file qgsmesh3dsymbol.cpp.

◆ singleMeshColor()

QColor QgsMesh3DSymbol::singleMeshColor ( ) const

Returns the single color.

Since
QGIS 3.12

Definition at line 198 of file qgsmesh3dsymbol.cpp.

◆ smoothedTriangles()

bool QgsMesh3DSymbol::smoothedTriangles ( ) const

Returns if mesh triangle are smoothed.

Since
QGIS 3.12

Definition at line 138 of file qgsmesh3dsymbol.cpp.

◆ type()

QString QgsMesh3DSymbol::type ( ) const
inlineoverridevirtual

Returns identifier of symbol type. Each 3D symbol implementation should return a different type.

Implements QgsAbstract3DSymbol.

Definition at line 68 of file qgsmesh3dsymbol.h.

◆ verticalDatasetGroupIndex()

int QgsMesh3DSymbol::verticalDatasetGroupIndex ( ) const

Returns the index of the dataset group that will be used to render the vertical component of the 3D mesh geometry.

Since
QGIS 3.14

Definition at line 218 of file qgsmesh3dsymbol.cpp.

◆ verticalScale()

double QgsMesh3DSymbol::verticalScale ( ) const

Returns mesh vertical scale.

Since
QGIS 3.12

Definition at line 178 of file qgsmesh3dsymbol.cpp.

◆ wireframeEnabled()

bool QgsMesh3DSymbol::wireframeEnabled ( ) const

Returns if the mesh wireframe.

Since
QGIS 3.12

Definition at line 148 of file qgsmesh3dsymbol.cpp.

◆ wireframeLineColor()

QColor QgsMesh3DSymbol::wireframeLineColor ( ) const

Returns wireframe line color.

Since
QGIS 3.12

Definition at line 168 of file qgsmesh3dsymbol.cpp.

◆ wireframeLineWidth()

double QgsMesh3DSymbol::wireframeLineWidth ( ) const

Returns wireframe line width.

Since
QGIS 3.12

Definition at line 158 of file qgsmesh3dsymbol.cpp.

◆ writeXml()

void QgsMesh3DSymbol::writeXml ( QDomElement &  elem,
const QgsReadWriteContext context 
) const
overridevirtual

Writes symbol configuration to the given DOM element.

Implements QgsAbstract3DSymbol.

Definition at line 59 of file qgsmesh3dsymbol.cpp.


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