QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
3 More...
#include <qgsmesh3dsymbol.h>
Public Types | |
enum | RenderingStyle { SingleColor = 0 , ColorRamp , ColorRamp2DRendering } |
How to render the color of the mesh. More... | |
enum | ZValueType { VerticesZValue = 0 , ScalarDatasetZvalue } |
How to render the Z value of the mesh. More... | |
Public Types inherited from QgsAbstract3DSymbol | |
enum | Property { PropertyHeight = 0 , PropertyExtrusionHeight } |
Data definable properties. More... | |
Public Member Functions | |
QgsMesh3DSymbol () | |
Constructor for QgsMesh3DSymbol. More... | |
~QgsMesh3DSymbol () override | |
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... | |
bool | arrowsEnabled () const |
Returns if arrows are enabled for 3D rendering. More... | |
bool | arrowsFixedSize () const |
Returns if the arrow size is fixed. More... | |
double | arrowsSpacing () const |
Returns the arrow spacing. More... | |
QgsMesh3DSymbol * | clone () const override SIP_FACTORY |
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... | |
bool | isEnabled () const |
Returns if the 3d rendering is enabled. More... | |
bool | isVerticalMagnitudeRelative () const |
Returns if the vertical component of the mesh is relative to the mesh vertices Z value. More... | |
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) More... | |
QgsAbstractMaterialSettings * | material () const |
Returns material used for shading of the symbol. More... | |
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. 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 | setArrowsEnabled (bool arrowsEnabled) |
Sets if arrows are enabled for 3D rendering. More... | |
void | setArrowsFixedSize (bool arrowsFixedSize) |
Sets if the arrow size is fixed. More... | |
void | setArrowsSpacing (double arrowsSpacing) |
Sets the arrow spacing. More... | |
void | setColorRampShader (const QgsColorRampShader &colorRampShader) |
Sets the color ramp shader used to render the color. More... | |
void | setEnabled (bool enabled) |
Sets if the 3d rendering is enabled. More... | |
void | setHeight (float height) |
Sets height (altitude) of the symbol (in map units) More... | |
void | setIsVerticalMagnitudeRelative (bool isVerticalMagnitudeRelative) |
Sets if the vertical component of the mesh is relative to the mesh vertices Z value. More... | |
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) More... | |
void | setMaterial (QgsAbstractMaterialSettings *material SIP_TRANSFER) |
Sets the material settings used for shading of the symbol. More... | |
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. 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 | setVerticalDatasetGroupIndex (int verticalDatasetGroupIndex) |
Sets the index of the dataset group that will be used to render the vertical component of the 3D mesh geometry. More... | |
void | setVerticalScale (double verticalScale) |
Sets mesh vertical 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... | |
int | verticalDatasetGroupIndex () const |
Returns the index of the dataset group that will be used to render the vertical component of the 3D mesh geometry. More... | |
double | verticalScale () const |
Returns mesh vertical 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 |
virtual QList< QgsWkbTypes::GeometryType > | compatibleGeometryTypes () const |
Returns the list of the vector layer geometry types which are compatible with this symbol. More... | |
QgsPropertyCollection & | dataDefinedProperties () |
Returns a reference to the symbol layer's property collection, used for data defined overrides. More... | |
const QgsPropertyCollection & | dataDefinedProperties () const |
Returns a reference to the symbol layer's property collection, used for data defined overrides. More... | |
virtual bool | exportGeometries (Qgs3DSceneExporter *exporter, Qt3DCore::QEntity *entity, const QString &objectNamePrefix) const |
Exports the geometries contained within the hierarchy of entity. 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 QgsPropertiesDefinition & | propertyDefinitions () |
Returns the symbol layer property definitions. More... | |
Protected Member Functions inherited from QgsAbstract3DSymbol | |
void | copyBaseSettings (QgsAbstract3DSymbol *destination) const |
Copies base class settings from this object to a destination object. More... | |
Protected Attributes inherited from QgsAbstract3DSymbol | |
QgsPropertyCollection | mDataDefinedProperties |
3
3D symbol that draws mesh geometry as planar triangles.
Definition at line 43 of file qgsmesh3dsymbol.h.
How to render the color of the mesh.
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 52 of file qgsmesh3dsymbol.h.
How to render the Z value of the mesh.
Enumerator | |
---|---|
VerticesZValue | Use the Z value of the vertices. |
ScalarDatasetZvalue | Use the value from a dataset (for example, water surface value) |
Definition at line 67 of file qgsmesh3dsymbol.h.
QgsMesh3DSymbol::QgsMesh3DSymbol | ( | ) |
Constructor for QgsMesh3DSymbol.
Definition at line 21 of file qgsmesh3dsymbol.cpp.
|
overridedefault |
|
inline |
Returns whether also triangles facing the other side will be created.
Useful if input data have inconsistent order of vertices
Definition at line 122 of file qgsmesh3dsymbol.h.
|
inline |
Returns method that determines altitude (whether to clamp to feature to terrain)
Definition at line 100 of file qgsmesh3dsymbol.h.
bool QgsMesh3DSymbol::arrowsEnabled | ( | ) | const |
Returns if arrows are enabled for 3D rendering.
Definition at line 235 of file qgsmesh3dsymbol.cpp.
bool QgsMesh3DSymbol::arrowsFixedSize | ( | ) | const |
Returns if the arrow size is fixed.
Definition at line 265 of file qgsmesh3dsymbol.cpp.
double QgsMesh3DSymbol::arrowsSpacing | ( | ) | const |
|
overridevirtual |
Returns a new instance of the symbol with the same settings.
Implements QgsAbstract3DSymbol.
Definition at line 29 of file qgsmesh3dsymbol.cpp.
QgsColorRampShader QgsMesh3DSymbol::colorRampShader | ( | ) | const |
Returns the color ramp shader used to render the color.
Definition at line 185 of file qgsmesh3dsymbol.cpp.
|
inline |
Returns height (altitude) of the symbol (in map units)
Definition at line 105 of file qgsmesh3dsymbol.h.
bool QgsMesh3DSymbol::isEnabled | ( | ) | const |
Returns if the 3d rendering is enabled.
Definition at line 285 of file qgsmesh3dsymbol.cpp.
bool QgsMesh3DSymbol::isVerticalMagnitudeRelative | ( | ) | const |
Returns if the vertical component of the mesh is relative to the mesh vertices Z value.
Definition at line 225 of file qgsmesh3dsymbol.cpp.
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)
Definition at line 275 of file qgsmesh3dsymbol.cpp.
QgsAbstractMaterialSettings * QgsMesh3DSymbol::material | ( | ) | const |
Returns material used for shading of the symbol.
Definition at line 296 of file qgsmesh3dsymbol.cpp.
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.
Definition at line 255 of file qgsmesh3dsymbol.cpp.
|
overridevirtual |
Reads symbol configuration from the given DOM element.
Implements QgsAbstract3DSymbol.
Definition at line 99 of file qgsmesh3dsymbol.cpp.
QgsMesh3DSymbol::RenderingStyle QgsMesh3DSymbol::renderingStyle | ( | ) | const |
|
inline |
Sets whether also triangles facing the other side will be created.
Useful if input data have inconsistent order of vertices
Definition at line 127 of file qgsmesh3dsymbol.h.
|
inline |
Sets method that determines altitude (whether to clamp to feature to terrain)
Definition at line 102 of file qgsmesh3dsymbol.h.
void QgsMesh3DSymbol::setArrowsEnabled | ( | bool | arrowsEnabled | ) |
Sets if arrows are enabled for 3D rendering.
Definition at line 240 of file qgsmesh3dsymbol.cpp.
void QgsMesh3DSymbol::setArrowsFixedSize | ( | bool | arrowsFixedSize | ) |
void QgsMesh3DSymbol::setArrowsSpacing | ( | double | arrowsSpacing | ) |
void QgsMesh3DSymbol::setColorRampShader | ( | const QgsColorRampShader & | colorRampShader | ) |
Sets the color ramp shader used to render the color.
Definition at line 190 of file qgsmesh3dsymbol.cpp.
void QgsMesh3DSymbol::setEnabled | ( | bool | enabled | ) |
Sets if the 3d rendering is enabled.
Definition at line 290 of file qgsmesh3dsymbol.cpp.
|
inline |
Sets height (altitude) of the symbol (in map units)
Definition at line 107 of file qgsmesh3dsymbol.h.
void QgsMesh3DSymbol::setIsVerticalMagnitudeRelative | ( | bool | isVerticalMagnitudeRelative | ) |
Sets if the vertical component of the mesh is relative to the mesh vertices Z value.
Definition at line 230 of file qgsmesh3dsymbol.cpp.
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)
Definition at line 280 of file qgsmesh3dsymbol.cpp.
void QgsMesh3DSymbol::setMaterial | ( | QgsAbstractMaterialSettings *material | SIP_TRANSFER | ) |
Sets the material settings used for shading of the symbol.
Ownership of material is transferred to the symbol.
Definition at line 301 of file qgsmesh3dsymbol.cpp.
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.
Definition at line 260 of file qgsmesh3dsymbol.cpp.
void QgsMesh3DSymbol::setRenderingStyle | ( | const QgsMesh3DSymbol::RenderingStyle & | textureType | ) |
void QgsMesh3DSymbol::setSingleMeshColor | ( | const QColor & | singleMeshColor | ) |
void QgsMesh3DSymbol::setSmoothedTriangles | ( | bool | smoothTriangles | ) |
Sets if the mesh triangles have to been smoothed.
Definition at line 140 of file qgsmesh3dsymbol.cpp.
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.
Definition at line 220 of file qgsmesh3dsymbol.cpp.
void QgsMesh3DSymbol::setVerticalScale | ( | double | verticalScale | ) |
void QgsMesh3DSymbol::setWireframeEnabled | ( | bool | wireframeEnabled | ) |
void QgsMesh3DSymbol::setWireframeLineColor | ( | const QColor & | wireframeLineColor | ) |
void QgsMesh3DSymbol::setWireframeLineWidth | ( | double | wireframeLineWidth | ) |
QColor QgsMesh3DSymbol::singleMeshColor | ( | ) | const |
bool QgsMesh3DSymbol::smoothedTriangles | ( | ) | const |
Returns if mesh triangle are smoothed.
Definition at line 135 of file qgsmesh3dsymbol.cpp.
|
inlineoverridevirtual |
Returns identifier of symbol type. Each 3D symbol implementation should return a different type.
Implements QgsAbstract3DSymbol.
Definition at line 79 of file qgsmesh3dsymbol.h.
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.
Definition at line 215 of file qgsmesh3dsymbol.cpp.
double QgsMesh3DSymbol::verticalScale | ( | ) | const |
bool QgsMesh3DSymbol::wireframeEnabled | ( | ) | const |
QColor QgsMesh3DSymbol::wireframeLineColor | ( | ) | const |
double QgsMesh3DSymbol::wireframeLineWidth | ( | ) | const |
|
overridevirtual |
Writes symbol configuration to the given DOM element.
Implements QgsAbstract3DSymbol.
Definition at line 58 of file qgsmesh3dsymbol.cpp.