QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
3 More...
#include <qgsdemterraingenerator.h>
Public Member Functions | |
QgsDemTerrainGenerator ()=default | |
~QgsDemTerrainGenerator () override | |
QgsTerrainGenerator * | clone () const override |
Makes a copy of the current instance. | |
QgsChunkLoader * | createChunkLoader (QgsChunkNode *node) const override |
QgsCoordinateReferenceSystem | crs () const override |
Returns CRS of the terrain. | |
float | heightAt (double x, double y, const Qgs3DRenderContext &context) const override |
Returns height at (x,y) in map's CRS. | |
QgsDemHeightMapGenerator * | heightMapGenerator () |
Returns height map generator object - takes care of extraction of elevations from the layer) | |
QgsRasterLayer * | layer () const |
Returns raster layer with elevation model to be used for terrain generation. | |
int | resolution () const |
Returns resolution of the generator (how many elevation samples on one side of a terrain tile) | |
QgsRectangle | rootChunkExtent () const override |
extent of the terrain's root chunk in terrain's CRS | |
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 | |
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. | |
float | skirtHeight () const |
Returns skirt height (in world units). Skirts at the edges of terrain tiles help hide cracks between adjacent tiles. | |
Type | type () const override |
What texture generator implementation is this. | |
Public Member Functions inherited from QgsTerrainGenerator | |
bool | isValid () const |
Returns whether the terrain generator is valid. | |
virtual QgsBox3D | rootChunkBox3D (const Qgs3DMapSettings &map) const |
Returns 3D box (in map coordinates) of the root chunk. | |
virtual float | rootChunkError (const Qgs3DMapSettings &map) const |
Returns error of the root chunk in world coordinates. | |
virtual void | rootChunkHeightRange (float &hMin, float &hMax) const |
Returns height range of the root chunk in world coordinates. | |
virtual void | setTerrain (QgsTerrainEntity *t) |
Sets terrain entity for the generator (does not transfer ownership) | |
const QgsTilingScheme & | tilingScheme () const |
Returns tiling scheme of the terrain. | |
Static Public Member Functions | |
static QgsTerrainGenerator * | create () |
Creates a new instance of a QgsDemTerrainGenerator object. | |
Static Public Member Functions inherited from QgsTerrainGenerator | |
static QString | typeToString (Type type) |
Converts terrain generator type enumeration into a string. | |
Additional Inherited Members | |
Public Types inherited from QgsTerrainGenerator | |
enum | Type { Flat , Dem , Online , Mesh , QuantizedMesh } |
Enumeration of the available terrain generators. More... | |
Signals inherited from QgsTerrainGenerator | |
void | terrainChanged () |
Emitted when the terrain changed (for example, raster DEM or mesh have data changed) | |
Protected Attributes inherited from QgsTerrainGenerator | |
QgsRectangle | mExtent |
bool | mIsValid = true |
QgsTerrainEntity * | mTerrain = nullptr |
QgsTilingScheme | mTerrainTilingScheme |
Tiling scheme of the terrain. | |
3
Implementation of terrain generator that uses a raster layer with DEM to build terrain.
Definition at line 37 of file qgsdemterraingenerator.h.
|
default |
|
override |
Definition at line 30 of file qgsdemterraingenerator.cpp.
|
overridevirtual |
Makes a copy of the current instance.
Implements QgsTerrainGenerator.
Definition at line 53 of file qgsdemterraingenerator.cpp.
|
static |
Creates a new instance of a QgsDemTerrainGenerator object.
Definition at line 25 of file qgsdemterraingenerator.cpp.
|
override |
Definition at line 85 of file qgsdemterraingenerator.cpp.
|
inlineoverridevirtual |
Returns CRS of the terrain.
Reimplemented from QgsTerrainGenerator.
Definition at line 56 of file qgsdemterraingenerator.h.
|
overridevirtual |
Returns height at (x,y) in map's CRS.
Reimplemented from QgsTerrainGenerator.
Definition at line 76 of file qgsdemterraingenerator.cpp.
|
inline |
Returns height map generator object - takes care of extraction of elevations from the layer)
Definition at line 73 of file qgsdemterraingenerator.h.
QgsRasterLayer * QgsDemTerrainGenerator::layer | ( | ) | const |
Returns raster layer with elevation model to be used for terrain generation.
Definition at line 41 of file qgsdemterraingenerator.cpp.
|
inline |
Returns resolution of the generator (how many elevation samples on one side of a terrain tile)
Definition at line 65 of file qgsdemterraingenerator.h.
|
overridevirtual |
extent of the terrain's root chunk in terrain's CRS
Implements QgsTerrainGenerator.
Definition at line 71 of file qgsdemterraingenerator.cpp.
|
overridevirtual |
Sets the CRS associated with the terrain.
Reimplemented from QgsTerrainGenerator.
Definition at line 46 of file qgsdemterraingenerator.cpp.
|
overridevirtual |
sets the extent of the terrain in terrain's CRS
Reimplemented from QgsTerrainGenerator.
Definition at line 91 of file qgsdemterraingenerator.cpp.
void QgsDemTerrainGenerator::setLayer | ( | QgsRasterLayer * | layer | ) |
Sets raster layer with elevation model to be used for terrain generation.
Definition at line 35 of file qgsdemterraingenerator.cpp.
|
inline |
Sets resolution of the generator (how many elevation samples on one side of a terrain tile)
Definition at line 59 of file qgsdemterraingenerator.h.
|
inline |
Sets skirt height (in world units). Skirts at the edges of terrain tiles help hide cracks between adjacent tiles.
Definition at line 68 of file qgsdemterraingenerator.h.
|
inline |
Returns skirt height (in world units). Skirts at the edges of terrain tiles help hide cracks between adjacent tiles.
Definition at line 70 of file qgsdemterraingenerator.h.
|
overridevirtual |
What texture generator implementation is this.
Implements QgsTerrainGenerator.
Definition at line 66 of file qgsdemterraingenerator.cpp.