16 #ifndef QGSTERRAINGENERATOR_H
17 #define QGSTERRAINGENERATOR_H
27 class QgsTerrainEntity;
85 virtual void rootChunkHeightRange(
float &hMin,
float &hMax )
const;
88 virtual float heightAt(
double x,
double y,
const Qgs3DMapSettings &map )
const;
91 virtual void writeXml( QDomElement &elem )
const = 0;
94 virtual void readXml(
const QDomElement &elem ) = 0;
100 static QString typeToString( Type type );
109 bool isValid()
const;
122 QgsTerrainEntity *mTerrain =
nullptr;
124 bool mIsValid =
true;
This class represents a coordinate reference system (CRS).
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
A rectangle specified with double values.
virtual QgsTerrainGenerator * clone() const =0SIP_FACTORY
Makes a copy of the current instance.
virtual void writeXml(QDomElement &elem) const =0
Write terrain generator's configuration to XML.
Type
Enumeration of the available terrain generators.
@ Dem
Terrain is built from raster layer with digital elevation model.
@ Online
Terrain is built from downloaded tiles with digital elevation model.
@ Flat
The whole terrain is flat area.
QgsTilingScheme mTerrainTilingScheme
Tiling scheme of the terrain.
const QgsTilingScheme & tilingScheme() const
Returns tiling scheme of the terrain.
void terrainChanged()
Emitted when the terrain changed (for example, raster DEM or mesh have data changed)
virtual QgsRectangle extent() const =0
extent of the terrain in terrain's CRS
virtual Type type() const =0
What texture generator implementation is this.
void extentChanged()
Emitted when the terrain extent has changed.
QgsCoordinateReferenceSystem crs() const
Returns CRS of the terrain.
virtual void setExtent(const QgsRectangle &extent)
sets the extent of the terrain in terrain's CRS
virtual void readXml(const QDomElement &elem)=0
Read terrain generator's configuration from XML.
virtual void resolveReferences(const QgsProject &project)
After read of XML, resolve references to any layers that have been read as layer IDs.
void setTerrain(QgsTerrainEntity *t)
Sets terrain entity for the generator (does not transfer ownership)