QgsDemTerrainGenerator class

3 Implementation of terrain generator that uses a raster layer with DEM to build terrain.

Base classes

class QgsTerrainGenerator
3 Base class for generators of terrain.

Constructors, destructors, conversion operators

QgsDemTerrainGenerator() defaulted
Constructor for QgsDemTerrainGenerator.

Public functions

auto clone() const -> QgsTerrainGenerator* override
Makes a copy of the current instance.
auto extent() const -> QgsRectangle override
extent of the terrain in terrain's CRS
auto heightAt(double x, double y, const Qgs3DMapSettings& map) const -> float override
Returns height at (x,y) in terrain's CRS.
auto heightMapGenerator() -> QgsDemHeightMapGenerator*
Returns height map generator object - takes care of extraction of elevations from the layer)
auto layer() const -> QgsRasterLayer*
Returns raster layer with elevation model to be used for terrain generation.
void readXml(const QDomElement& elem) override
Read terrain generator's configuration from XML.
auto resolution() const -> int
Returns resolution of the generator (how many elevation samples on one side of a terrain tile)
void resolveReferences(const QgsProject& project) override
After read of XML, resolve references to any layers that have been read as layer IDs.
void setCrs(const QgsCoordinateReferenceSystem& crs, const QgsCoordinateTransformContext& context)
Sets CRS of the terrain.
void setLayer(QgsRasterLayer* layer)
Sets raster layer with elevation model to be used for terrain generation.
void setResolution(int resolution)
Sets resolution of the generator (how many elevation samples on one side of a terrain tile)
void setSkirtHeight(float skirtHeight)
Sets skirt height (in world units). Skirts at the edges of terrain tiles help hide cracks between adjacent tiles.
auto skirtHeight() const -> float
Returns skirt height (in world units). Skirts at the edges of terrain tiles help hide cracks between adjacent tiles.
auto type() const -> Type override
What texture generator implementation is this.
void writeXml(QDomElement& elem) const override
Write terrain generator's configuration to XML.