16#ifndef QGSDEMTERRAINGENERATOR_H
17#define QGSDEMTERRAINGENERATOR_H
23class QgsDemHeightMapGenerator;
75 Type type() const override;
78 float heightAt(
double x,
double y, const
Qgs3DRenderContext &context ) const override;
80 QgsChunkLoader *createChunkLoader( QgsChunkNode *node ) const override
SIP_FACTORY;
83 void updateGenerator();
85 QgsDemHeightMapGenerator *mHeightMapGenerator =
nullptr;
96 float mSkirtHeight = 10.f;
Rendering context for preparation of 3D entities.
Represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
static QgsTerrainGenerator * create()
Creates a new instance of a QgsDemTerrainGenerator object.
int resolution() const
Returns resolution of the generator (how many elevation samples on one side of a terrain tile).
QgsRasterLayer * layer() const
Returns raster layer with elevation model to be used for terrain generation.
QgsCoordinateReferenceSystem crs() const override
Returns CRS of the terrain.
QgsDemHeightMapGenerator * heightMapGenerator()
Returns height map generator object - takes care of extraction of elevations from the layer).
void setLayer(QgsRasterLayer *layer)
Sets raster layer with elevation model to be used for terrain generation.
void setSkirtHeight(float skirtHeight)
Sets skirt height (in world units). Skirts at the edges of terrain tiles help hide cracks between adj...
void setResolution(int resolution)
Sets resolution of the generator (how many elevation samples on one side of a terrain tile).
QgsDemTerrainGenerator()=default
float skirtHeight() const
Returns skirt height (in world units). Skirts at the edges of terrain tiles help hide cracks between ...
Represents a raster layer.
A rectangle specified with double values.
Base class for generators of terrain.
virtual QgsTerrainGenerator * clone() const =0SIP_FACTORY
Makes a copy of the current instance.
virtual void setCrs(const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context)
Sets the CRS associated with the terrain.