QGIS API Documentation  3.12.1-BucureČ™ti (121cc00ff0)
Public Types | Public Member Functions | List of all members
QgsMesh3DSymbol Class Reference

3 3D symbol that draws mesh geometry as planar triangles. More...

#include <qgsmesh3dsymbol.h>

Inheritance diagram for QgsMesh3DSymbol:
Inheritance graph
[legend]

Public Types

enum  RenderingStyle { SingleColor = 0, ColorRamp }
 How to render the color of the mesh with advanced symbology. More...
 
- Public Types inherited from QgsAbstract3DSymbol
enum  Property { PropertyHeight = 0, PropertyExtrusionHeight }
 Data definable properties. More...
 

Public Member Functions

 QgsMesh3DSymbol ()=default
 Constructor for QgsMesh3DSymbol. More...
 
bool addBackFaces () const
 Returns whether also triangles facing the other side will be created. More...
 
Qgs3DTypes::AltitudeClamping altitudeClamping () const
 Returns method that determines altitude (whether to clamp to feature to terrain) More...
 
QgsAbstract3DSymbolclone () const override
 Returns a new instance of the symbol with the same settings. More...
 
QgsColorRampShader colorRampShader () const
 Returns the color ramp shader used to render the color. More...
 
float height () const
 Returns height (altitude) of the symbol (in map units) More...
 
QgsPhongMaterialSettings material () const
 Returns material used for shading of the symbol. More...
 
void readXml (const QDomElement &elem, const QgsReadWriteContext &context) override
 Reads symbol configuration from the given DOM element. More...
 
QgsMesh3DSymbol::RenderingStyle renderingStyle () const
 Returns the rendering style. More...
 
void setAddBackFaces (bool add)
 Sets whether also triangles facing the other side will be created. More...
 
void setAltitudeClamping (Qgs3DTypes::AltitudeClamping altClamping)
 Sets method that determines altitude (whether to clamp to feature to terrain) More...
 
void setColorRampShader (const QgsColorRampShader &colorRampShader)
 Sets the color ramp shader used to render the color. More...
 
void setHeight (float height)
 Sets height (altitude) of the symbol (in map units) More...
 
void setMaterial (const QgsPhongMaterialSettings &material)
 Sets material used for shading of the symbol. More...
 
void setRenderingStyle (const QgsMesh3DSymbol::RenderingStyle &textureType)
 Sets the rendering style. More...
 
void setSingleMeshColor (const QColor &singleMeshColor)
 Sets the single color. More...
 
void setSmoothedTriangles (bool smoothTriangles)
 Sets if the mesh triangles have to been smoothed. More...
 
void setVerticaleScale (double verticaleScale)
 Sets mesh verticale scale. More...
 
void setWireframeEnabled (bool wireframeEnabled)
 Sets if the mesh wireframe. More...
 
void setWireframeLineColor (const QColor &wireframeLineColor)
 Sets wireframe line color. More...
 
void setWireframeLineWidth (double wireframeLineWidth)
 Sets wireframe line width. More...
 
QColor singleMeshColor () const
 Returns the single color. More...
 
bool smoothedTriangles () const
 Returns if mesh triangle are smoothed. More...
 
QString type () const override
 Returns identifier of symbol type. Each 3D symbol implementation should return a different type. More...
 
double verticaleScale () const
 Returns mesh verticale scale. More...
 
bool wireframeEnabled () const
 Returns if the mesh wireframe. More...
 
QColor wireframeLineColor () const
 Returns wireframe line color. More...
 
double wireframeLineWidth () const
 Returns wireframe line width. More...
 
void writeXml (QDomElement &elem, const QgsReadWriteContext &context) const override
 Writes symbol configuration to the given DOM element. More...
 
- Public Member Functions inherited from QgsAbstract3DSymbol
virtual ~QgsAbstract3DSymbol ()=default
 
QgsPropertyCollectiondataDefinedProperties ()
 Returns a reference to the symbol layer's property collection, used for data defined overrides. More...
 
const QgsPropertyCollectiondataDefinedProperties () const
 Returns a reference to the symbol layer's property collection, used for data defined overrides. More...
 
void setDataDefinedProperties (const QgsPropertyCollection &collection)
 Sets the symbol layer's property collection, used for data defined overrides. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from QgsAbstract3DSymbol
static const QgsPropertiesDefinitionpropertyDefinitions ()
 Returns the symbol layer property definitions. More...
 
- 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 37 of file qgsmesh3dsymbol.h.

Member Enumeration Documentation

◆ RenderingStyle

How to render the color of the mesh with advanced symbology.

Since
QGIS 3.12
Enumerator
SingleColor 

Render the mesh with a single color.

ColorRamp 

Render the mesh with a color ramp.

Definition at line 46 of file qgsmesh3dsymbol.h.

Constructor & Destructor Documentation

◆ QgsMesh3DSymbol()

QgsMesh3DSymbol::QgsMesh3DSymbol ( )
default

Constructor for QgsMesh3DSymbol.

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 81 of file qgsmesh3dsymbol.h.

◆ altitudeClamping()

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

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

Definition at line 64 of file qgsmesh3dsymbol.h.

◆ clone()

QgsAbstract3DSymbol * QgsMesh3DSymbol::clone ( ) const
overridevirtual

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

Implements QgsAbstract3DSymbol.

Definition at line 20 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 142 of file qgsmesh3dsymbol.cpp.

◆ height()

float QgsMesh3DSymbol::height ( ) const
inline

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

Definition at line 69 of file qgsmesh3dsymbol.h.

◆ material()

QgsPhongMaterialSettings QgsMesh3DSymbol::material ( ) const
inline

Returns material used for shading of the symbol.

Definition at line 74 of file qgsmesh3dsymbol.h.

◆ readXml()

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

Reads symbol configuration from the given DOM element.

Implements QgsAbstract3DSymbol.

Definition at line 61 of file qgsmesh3dsymbol.cpp.

◆ renderingStyle()

QgsMesh3DSymbol::RenderingStyle QgsMesh3DSymbol::renderingStyle ( ) const

Returns the rendering style.

Since
QGIS 3.12

Definition at line 162 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 86 of file qgsmesh3dsymbol.h.

◆ setAltitudeClamping()

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

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

Definition at line 66 of file qgsmesh3dsymbol.h.

◆ setColorRampShader()

void QgsMesh3DSymbol::setColorRampShader ( const QgsColorRampShader colorRampShader)

Sets the color ramp shader used to render the color.

Since
QGIS 3.12

Definition at line 147 of file qgsmesh3dsymbol.cpp.

◆ setHeight()

void QgsMesh3DSymbol::setHeight ( float  height)
inline

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

Definition at line 71 of file qgsmesh3dsymbol.h.

◆ setMaterial()

void QgsMesh3DSymbol::setMaterial ( const QgsPhongMaterialSettings material)
inline

Sets material used for shading of the symbol.

Definition at line 76 of file qgsmesh3dsymbol.h.

◆ setRenderingStyle()

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

Sets the rendering style.

Since
QGIS 3.12

Definition at line 167 of file qgsmesh3dsymbol.cpp.

◆ setSingleMeshColor()

void QgsMesh3DSymbol::setSingleMeshColor ( const QColor &  singleMeshColor)

Sets the single color.

Since
QGIS 3.12

Definition at line 157 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 97 of file qgsmesh3dsymbol.cpp.

◆ setVerticaleScale()

void QgsMesh3DSymbol::setVerticaleScale ( double  verticaleScale)

Sets mesh verticale scale.

Since
QGIS 3.12

Definition at line 137 of file qgsmesh3dsymbol.cpp.

◆ setWireframeEnabled()

void QgsMesh3DSymbol::setWireframeEnabled ( bool  wireframeEnabled)

Sets if the mesh wireframe.

Since
QGIS 3.12

Definition at line 107 of file qgsmesh3dsymbol.cpp.

◆ setWireframeLineColor()

void QgsMesh3DSymbol::setWireframeLineColor ( const QColor &  wireframeLineColor)

Sets wireframe line color.

Since
QGIS 3.12

Definition at line 127 of file qgsmesh3dsymbol.cpp.

◆ setWireframeLineWidth()

void QgsMesh3DSymbol::setWireframeLineWidth ( double  wireframeLineWidth)

Sets wireframe line width.

Since
QGIS 3.12

Definition at line 117 of file qgsmesh3dsymbol.cpp.

◆ singleMeshColor()

QColor QgsMesh3DSymbol::singleMeshColor ( ) const

Returns the single color.

Since
QGIS 3.12

Definition at line 152 of file qgsmesh3dsymbol.cpp.

◆ smoothedTriangles()

bool QgsMesh3DSymbol::smoothedTriangles ( ) const

Returns if mesh triangle are smoothed.

Since
QGIS 3.12

Definition at line 92 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 57 of file qgsmesh3dsymbol.h.

◆ verticaleScale()

double QgsMesh3DSymbol::verticaleScale ( ) const

Returns mesh verticale scale.

Since
QGIS 3.12

Definition at line 132 of file qgsmesh3dsymbol.cpp.

◆ wireframeEnabled()

bool QgsMesh3DSymbol::wireframeEnabled ( ) const

Returns if the mesh wireframe.

Since
QGIS 3.12

Definition at line 102 of file qgsmesh3dsymbol.cpp.

◆ wireframeLineColor()

QColor QgsMesh3DSymbol::wireframeLineColor ( ) const

Returns wireframe line color.

Since
QGIS 3.12

Definition at line 122 of file qgsmesh3dsymbol.cpp.

◆ wireframeLineWidth()

double QgsMesh3DSymbol::wireframeLineWidth ( ) const

Returns wireframe line width.

Since
QGIS 3.12

Definition at line 112 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 25 of file qgsmesh3dsymbol.cpp.


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