QGIS API Documentation 3.41.0-Master (cea29feecf2)
|
3 More...
#include <qgsabstractterrainsettings.h>
Public Member Functions | |
virtual | ~QgsAbstractTerrainSettings () |
virtual QgsAbstractTerrainSettings * | clone () const =0 |
Returns a copy of the terrain settings. | |
virtual std::unique_ptr< QgsTerrainGenerator > | createTerrainGenerator (const Qgs3DRenderContext &context) const =0 |
Creates a new instance of a terrain generator which matches the terrain settings. | |
double | elevationOffset () const |
Returns the elevation offset of the terrain (used to move the terrain up or down). | |
virtual bool | equals (const QgsAbstractTerrainSettings *other) const =0 |
Returns true if this settings is exactly equal to another other settings. | |
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. | |
virtual void | readXml (const QDomElement &element, const QgsReadWriteContext &context)=0 |
Reads settings from a DOM element. | |
virtual void | resolveReferences (const QgsProject *project) |
After reading settings from XML, resolves references to any layers in a project that have been read as layer IDs. | |
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. | |
virtual QString | type () const =0 |
Returns the unique type name for the terrain generator. | |
double | verticalScale () const |
Returns the vertical scale (exaggeration) for terrain. | |
virtual void | writeXml (QDomElement &element, const QgsReadWriteContext &context) const =0 |
Writes settings to a DOM element. | |
Protected Member Functions | |
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. | |
3
Base class for all terrain settings classes.
QgsAbstractTerrainSettings subclasses are responsible for storing the configuration of terrain generators.
Definition at line 42 of file qgsabstractterrainsettings.h.
|
virtualdefault |
|
pure virtual |
Returns a copy of the terrain settings.
Implemented in QgsDemTerrainSettings, QgsFlatTerrainSettings, QgsMeshTerrainSettings, QgsOnlineDemTerrainSettings, and QgsQuantizedMeshTerrainSettings.
|
protected |
Copies common properties from a source object.
Definition at line 44 of file qgsabstractterrainsettings.cpp.
|
pure virtual |
Creates a new instance of a terrain generator which matches the terrain settings.
Implemented in QgsDemTerrainSettings, QgsFlatTerrainSettings, QgsMeshTerrainSettings, QgsOnlineDemTerrainSettings, and QgsQuantizedMeshTerrainSettings.
|
inline |
Returns the elevation offset of the terrain (used to move the terrain up or down).
Definition at line 196 of file qgsabstractterrainsettings.h.
|
pure virtual |
Returns true
if this settings is exactly equal to another other settings.
Implemented in QgsDemTerrainSettings, QgsFlatTerrainSettings, QgsMeshTerrainSettings, QgsOnlineDemTerrainSettings, and QgsQuantizedMeshTerrainSettings.
|
protected |
Returns true
if common base class settings from other match this object.
Definition at line 53 of file qgsabstractterrainsettings.cpp.
|
inline |
Returns the resolution (in pixels) of the texture of a terrain tile.
This parameter influences how many zoom levels for terrain tiles there will be (together with maxTerrainGroundError())
Definition at line 145 of file qgsabstractterrainsettings.h.
|
inline |
Returns the maximum ground error of terrain tiles in world units.
This parameter influences how many zoom levels there will be (together with mapTileResolution()). This value tells that when the given ground error is reached (e.g. 10 meters), it makes no sense to further split terrain tiles into finer ones because they will not add extra details anymore.
Definition at line 182 of file qgsabstractterrainsettings.h.
|
inline |
Returns the maximum allowed screen error of terrain tiles in pixels.
This parameter decides how aggressively less detailed terrain tiles are swapped to more detailed ones as camera gets closer. Each tile has its error defined in world units - this error gets projected to screen pixels according to camera view and if the tile's error is greater than the allowed error, it will be swapped by more detailed tiles with lower error.
Definition at line 164 of file qgsabstractterrainsettings.h.
|
protected |
Reads common properties from the base class from the given DOM element.
Definition at line 35 of file qgsabstractterrainsettings.cpp.
|
pure virtual |
Reads settings from a DOM element.
Subclasses should take care to call readCommonProperties() to read common properties from the element.
Implemented in QgsDemTerrainSettings, QgsFlatTerrainSettings, QgsMeshTerrainSettings, QgsOnlineDemTerrainSettings, and QgsQuantizedMeshTerrainSettings.
|
virtual |
After reading settings from XML, resolves references to any layers in a project that have been read as layer IDs.
Reimplemented in QgsDemTerrainSettings, QgsMeshTerrainSettings, and QgsQuantizedMeshTerrainSettings.
Definition at line 22 of file qgsabstractterrainsettings.cpp.
|
inline |
Sets the terrain elevation offset (used to move the terrain up or down).
Definition at line 189 of file qgsabstractterrainsettings.h.
|
inline |
Sets the resolution (in pixels) of the texture of a terrain tile.
Definition at line 136 of file qgsabstractterrainsettings.h.
|
inline |
Sets the maximum ground error of terrain tiles in world units.
Definition at line 171 of file qgsabstractterrainsettings.h.
|
inline |
Sets the maximum allowed screen error of terrain tiles in pixels.
Definition at line 152 of file qgsabstractterrainsettings.h.
|
inline |
Sets the vertical scale (exaggeration) for terrain.
(1 = true scale, > 1 = hills get more pronounced)
Definition at line 121 of file qgsabstractterrainsettings.h.
|
pure virtual |
Returns the unique type name for the terrain generator.
Implemented in QgsDemTerrainSettings, QgsFlatTerrainSettings, QgsMeshTerrainSettings, QgsOnlineDemTerrainSettings, and QgsQuantizedMeshTerrainSettings.
|
inline |
Returns the vertical scale (exaggeration) for terrain.
(1 = true scale, > 1 = hills get more pronounced)
Definition at line 130 of file qgsabstractterrainsettings.h.
|
protected |
Writes common properties from the base class into an XML element.
Definition at line 26 of file qgsabstractterrainsettings.cpp.
|
pure virtual |
Writes settings to a DOM element.
Subclasses should take care to call writeCommonProperties() to write common properties to the element.
Implemented in QgsDemTerrainSettings, QgsFlatTerrainSettings, QgsMeshTerrainSettings, QgsOnlineDemTerrainSettings, and QgsQuantizedMeshTerrainSettings.