QGIS API Documentation 3.99.0-Master (752b475928d)
Loading...
Searching...
No Matches
QgsMeshTerrainSettings Class Reference

Terrain settings for a terrain generator that uses the Z values of a mesh layer to build a terrain. More...

#include <qgsmeshterrainsettings.h>

Inheritance diagram for QgsMeshTerrainSettings:

Public Member Functions

 QgsMeshTerrainSettings ()
 ~QgsMeshTerrainSettings () override
QgsMeshTerrainSettingsclone () const final
 Returns a copy of the terrain settings.
std::unique_ptr< QgsTerrainGeneratorcreateTerrainGenerator (const Qgs3DRenderContext &context) const override
 Creates a new instance of a terrain generator which matches the terrain settings.
bool equals (const QgsAbstractTerrainSettings *other) const final
 Returns true if this settings is exactly equal to another other settings.
QgsMeshLayerlayer () const
 Returns the mesh layer with elevation model to be used for terrain generation.
void readXml (const QDomElement &element, const QgsReadWriteContext &context) final
 Reads settings from a DOM element.
void resolveReferences (const QgsProject *project) final
 After reading settings from XML, resolves references to any layers in a project that have been read as layer IDs.
void setLayer (QgsMeshLayer *layer)
 Sets the mesh layer with elevation model to be used for terrain generation.
void setSymbol (QgsMesh3DSymbol *symbol)
 Sets the symbol used to render the mesh as terrain.
QgsMesh3DSymbolsymbol () const
 Returns the symbol used to render the mesh as terrain.
QString type () const final
 Returns the unique type name for the terrain generator.
void writeXml (QDomElement &element, const QgsReadWriteContext &context) const final
 Writes settings to a DOM element.
Public Member Functions inherited from QgsAbstractTerrainSettings
virtual ~QgsAbstractTerrainSettings ()
double elevationOffset () const
 Returns the elevation offset of the terrain (used to move the terrain up or down).
int mapTileResolution () const
 Returns the resolution (in pixels) of the texture of a terrain tile.
double maximumGroundError () const
 Returns the maximum ground error of terrain tiles in world units.
double maximumScreenError () const
 Returns the maximum allowed screen error of terrain tiles in pixels.
void setElevationOffset (double offset)
 Sets the terrain elevation offset (used to move the terrain up or down).
void setMapTileResolution (int resolution)
 Sets the resolution (in pixels) of the texture of a terrain tile.
void setMaximumGroundError (double error)
 Sets the maximum ground error of terrain tiles in world units.
void setMaximumScreenError (double error)
 Sets the maximum allowed screen error of terrain tiles in pixels.
void setVerticalScale (double scale)
 Sets the vertical scale (exaggeration) for terrain.
double verticalScale () const
 Returns the vertical scale (exaggeration) for terrain.

Static Public Member Functions

static QgsAbstractTerrainSettingscreate ()
 Creates a new instance of a QgsMeshTerrainSettings object.

Additional Inherited Members

Protected Member Functions inherited from QgsAbstractTerrainSettings
void copyCommonProperties (const QgsAbstractTerrainSettings *source)
 Copies common properties from a source object.
bool equalsCommon (const QgsAbstractTerrainSettings *other) const
 Returns true if common base class settings from other match this object.
void readCommonProperties (const QDomElement &element, const QgsReadWriteContext &context)
 Reads common properties from the base class from the given DOM element.
void writeCommonProperties (QDomElement &element, const QgsReadWriteContext &context) const
 Writes common properties from the base class into an XML element.

Detailed Description

Terrain settings for a terrain generator that uses the Z values of a mesh layer to build a terrain.

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.42

Definition at line 39 of file qgsmeshterrainsettings.h.

Constructor & Destructor Documentation

◆ QgsMeshTerrainSettings()

QgsMeshTerrainSettings::QgsMeshTerrainSettings ( )

Definition at line 27 of file qgsmeshterrainsettings.cpp.

◆ ~QgsMeshTerrainSettings()

QgsMeshTerrainSettings::~QgsMeshTerrainSettings ( )
overridedefault

Member Function Documentation

◆ clone()

QgsMeshTerrainSettings * QgsMeshTerrainSettings::clone ( ) const
finalvirtual

Returns a copy of the terrain settings.

Implements QgsAbstractTerrainSettings.

Definition at line 34 of file qgsmeshterrainsettings.cpp.

◆ create()

QgsAbstractTerrainSettings * QgsMeshTerrainSettings::create ( )
static

Creates a new instance of a QgsMeshTerrainSettings object.

Definition at line 22 of file qgsmeshterrainsettings.cpp.

◆ createTerrainGenerator()

std::unique_ptr< QgsTerrainGenerator > QgsMeshTerrainSettings::createTerrainGenerator ( const Qgs3DRenderContext & context) const
overridevirtual

Creates a new instance of a terrain generator which matches the terrain settings.

Note
Not available in Python bindings

Implements QgsAbstractTerrainSettings.

Definition at line 99 of file qgsmeshterrainsettings.cpp.

◆ equals()

bool QgsMeshTerrainSettings::equals ( const QgsAbstractTerrainSettings * other) const
finalvirtual

Returns true if this settings is exactly equal to another other settings.

Implements QgsAbstractTerrainSettings.

Definition at line 84 of file qgsmeshterrainsettings.cpp.

◆ layer()

QgsMeshLayer * QgsMeshTerrainSettings::layer ( ) const

Returns the mesh layer with elevation model to be used for terrain generation.

See also
setLayer()

Definition at line 116 of file qgsmeshterrainsettings.cpp.

◆ readXml()

void QgsMeshTerrainSettings::readXml ( const QDomElement & element,
const QgsReadWriteContext & context )
finalvirtual

Reads settings from a DOM element.

Subclasses should take care to call readCommonProperties() to read common properties from the element.

See also
resolveReferences()
writeXml()

Implements QgsAbstractTerrainSettings.

Definition at line 48 of file qgsmeshterrainsettings.cpp.

◆ resolveReferences()

void QgsMeshTerrainSettings::resolveReferences ( const QgsProject * project)
finalvirtual

After reading settings from XML, resolves references to any layers in a project that have been read as layer IDs.

See also
readXml()

Reimplemented from QgsAbstractTerrainSettings.

Definition at line 79 of file qgsmeshterrainsettings.cpp.

◆ setLayer()

void QgsMeshTerrainSettings::setLayer ( QgsMeshLayer * layer)

Sets the mesh layer with elevation model to be used for terrain generation.

See also
layer()

Definition at line 111 of file qgsmeshterrainsettings.cpp.

◆ setSymbol()

void QgsMeshTerrainSettings::setSymbol ( QgsMesh3DSymbol * symbol)

Sets the symbol used to render the mesh as terrain.

See also
symbol()

Definition at line 126 of file qgsmeshterrainsettings.cpp.

◆ symbol()

QgsMesh3DSymbol * QgsMeshTerrainSettings::symbol ( ) const

Returns the symbol used to render the mesh as terrain.

See also
setSymbol()

Definition at line 121 of file qgsmeshterrainsettings.cpp.

◆ type()

QString QgsMeshTerrainSettings::type ( ) const
finalvirtual

Returns the unique type name for the terrain generator.

Implements QgsAbstractTerrainSettings.

Definition at line 43 of file qgsmeshterrainsettings.cpp.

◆ writeXml()

void QgsMeshTerrainSettings::writeXml ( QDomElement & element,
const QgsReadWriteContext & context ) const
finalvirtual

Writes settings to a DOM element.

Subclasses should take care to call writeCommonProperties() to write common properties to the element.

See also
readXml()

Implements QgsAbstractTerrainSettings.

Definition at line 66 of file qgsmeshterrainsettings.cpp.


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