22#include "moc_qgsonlineterraingenerator.cpp"
39 cloned->mResolution = mResolution;
40 cloned->mSkirtHeight = mSkirtHeight;
41 cloned->updateGenerator();
58 if ( mHeightMapGenerator )
59 return mHeightMapGenerator->heightAt( x, y );
72 mTransformContext = context;
85void QgsOnlineTerrainGenerator::updateGenerator()
97 mHeightMapGenerator = std::make_unique<QgsDemHeightMapGenerator>(
nullptr,
mTerrainTilingScheme, mResolution, mTransformContext );
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.
void setCrs(const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context) override
Sets the CRS associated with the terrain.
void setExtent(const QgsRectangle &extent) override
sets the extent of the terrain in terrain's CRS
QgsChunkLoader * createChunkLoader(QgsChunkNode *node) const override
static QgsTerrainGenerator * create()
Creates a new instance of a QgsOnlineTerrainGenerator object.
float heightAt(double x, double y, const Qgs3DRenderContext &context) const override
Returns height at (x,y) in map's CRS.
~QgsOnlineTerrainGenerator() override
QgsOnlineTerrainGenerator()
QgsTerrainGenerator * clone() const override
Makes a copy of the current instance.
QgsCoordinateReferenceSystem crs() const override
Returns CRS of the terrain.
QgsRectangle rootChunkExtent() const override
extent of the terrain's root chunk in terrain's CRS
Type type() const override
What texture generator implementation is this.
A rectangle specified with double values.
Base class for generators of terrain.
Type
Enumeration of the available terrain generators.
@ Online
Terrain is built from downloaded tiles with digital elevation model.
QgsTilingScheme mTerrainTilingScheme
Tiling scheme of the terrain.
QgsTerrainEntity * mTerrain
virtual void setTerrain(QgsTerrainEntity *t)
Sets terrain entity for the generator (does not transfer ownership).
Encapsulates tiling schemes (just like with WMTS / TMS / XYZ layers).