16#ifndef QGSABSTRACTTERRAINSETTINGS_H
17#define QGSABSTRACTTERRAINSETTINGS_H
46 if ( sipCpp->type() ==
"flat" )
47 sipType = sipType_QgsFlatTerrainSettings;
48 else if ( sipCpp->type() ==
"dem" )
49 sipType = sipType_QgsDemTerrainSettings;
50 else if ( sipCpp->type() ==
"online" )
51 sipType = sipType_QgsOnlineDemTerrainSettings;
52 else if ( sipCpp->type() ==
"mesh" )
53 sipType = sipType_QgsMeshTerrainSettings;
54 else if ( sipCpp->type() ==
"quantizedmesh" )
55 sipType = sipType_QgsQuantizedMeshTerrainSettings;
72 virtual QString
type()
const = 0;
103 virtual void resolveReferences(
const QgsProject *project );
204 void writeCommonProperties( QDomElement &element,
const QgsReadWriteContext &context )
const;
211 void readCommonProperties(
const QDomElement &element,
const QgsReadWriteContext &context );
224 double mTerrainVerticalScale = 1;
225 int mMapTileResolution = 512;
226 double mMaxTerrainScreenError = 3.0;
227 double mMaxTerrainGroundError = 1.0;
228 double mTerrainElevationOffset = 0.0;
double maximumGroundError() const
Returns the maximum ground error of terrain tiles in world units.
int mapTileResolution() const
Returns the resolution (in pixels) of the texture of a terrain tile.
virtual void readXml(const QDomElement &element, const QgsReadWriteContext &context)=0
Reads settings from a DOM element.
double elevationOffset() const
Returns the elevation offset of the terrain (used to move the terrain up or down).
double verticalScale() const
Returns the vertical scale (exaggeration) for terrain.
void setMaximumGroundError(double error)
Sets the maximum ground error of terrain tiles in world units.
void setMapTileResolution(int resolution)
Sets the resolution (in pixels) of the texture of a terrain tile.
double maximumScreenError() const
Returns the maximum allowed screen error of terrain tiles in pixels.
virtual std::unique_ptr< QgsTerrainGenerator > createTerrainGenerator(const Qgs3DRenderContext &context) const =0
Creates a new instance of a terrain generator which matches the terrain settings.
void setElevationOffset(double offset)
Sets the terrain elevation offset (used to move the terrain up or down).
virtual ~QgsAbstractTerrainSettings()
void setVerticalScale(double scale)
Sets the vertical scale (exaggeration) for terrain.
virtual QgsAbstractTerrainSettings * clone() const =0
Returns a copy of the terrain settings.
virtual bool equals(const QgsAbstractTerrainSettings *other) const =0
Returns true if this settings is exactly equal to another other settings.
void setMaximumScreenError(double error)
Sets the maximum allowed screen error of terrain tiles in pixels.
virtual QString type() const =0
Returns the unique type name for the terrain generator.
virtual void writeXml(QDomElement &element, const QgsReadWriteContext &context) const =0
Writes settings to a DOM element.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
The class is used as a container of context for various read/write operations on other objects.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)