QGIS API Documentation  3.8.0-Zanzibar (11aff65)
Public Member Functions | List of all members
QgsOnlineTerrainGenerator Class Reference

3 Implementation of terrain generator that uses online resources to download heightmaps. More...

#include <qgsonlineterraingenerator.h>

Inheritance diagram for QgsOnlineTerrainGenerator:
Inheritance graph
[legend]

Public Member Functions

 QgsOnlineTerrainGenerator ()
 Constructor for QgsOnlineTerrainGenerator. More...
 
 ~QgsOnlineTerrainGenerator () override
 
QgsTerrainGeneratorclone () const override
 Makes a copy of the current instance. More...
 
QgsChunkLoader * createChunkLoader (QgsChunkNode *node) const override
 
QgsCoordinateReferenceSystem crs () const
 Returns CRS of the terrain. More...
 
QgsRectangle extent () const override
 extent of the terrain in terrain's CRS More...
 
float heightAt (double x, double y, const Qgs3DMapSettings &map) const override
 Returns height at (x,y) in terrain's CRS. More...
 
QgsDemHeightMapGenerator * heightMapGenerator ()
 Returns height map generator object - takes care of extraction of elevations from the layer) More...
 
void readXml (const QDomElement &elem) override
 Read terrain generator's configuration from XML. More...
 
int resolution () const
 Returns resolution of the generator (how many elevation samples on one side of a terrain tile) More...
 
void setCrs (const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context)
 Sets CRS of the terrain. More...
 
void setExtent (const QgsRectangle &extent)
 Sets extent of the terrain. More...
 
void setResolution (int resolution)
 Sets resolution of the generator (how many elevation samples on one side of a terrain tile) More...
 
void setSkirtHeight (float skirtHeight)
 Sets skirt height (in world units). Skirts at the edges of terrain tiles help hide cracks between adjacent tiles. More...
 
float skirtHeight () const
 Returns skirt height (in world units). Skirts at the edges of terrain tiles help hide cracks between adjacent tiles. More...
 
Type type () const override
 What texture generator implementation is this. More...
 
void writeXml (QDomElement &elem) const override
 Write terrain generator's configuration to XML. More...
 
- Public Member Functions inherited from QgsTerrainGenerator
QgsCoordinateReferenceSystem crs () const
 Returns CRS of the terrain. More...
 
virtual void resolveReferences (const QgsProject &project)
 After read of XML, resolve references to any layers that have been read as layer IDs. More...
 
virtual QgsAABB rootChunkBbox (const Qgs3DMapSettings &map) const
 Returns bounding box of the root chunk. More...
 
virtual float rootChunkError (const Qgs3DMapSettings &map) const
 Returns error of the root chunk in world coordinates. More...
 
virtual void rootChunkHeightRange (float &hMin, float &hMax) const
 Returns height range of the root chunk in world coordinates. More...
 
void setTerrain (QgsTerrainEntity *t)
 Sets terrain entity for the generator (does not transfer ownership) More...
 
const QgsTilingSchemetilingScheme () const
 Returns tiling scheme of the terrain. More...
 

Additional Inherited Members

- Public Types inherited from QgsTerrainGenerator
enum  Type { Flat, Dem, Online }
 Enumeration of the available terrain generators. More...
 
- Static Public Member Functions inherited from QgsTerrainGenerator
static QString typeToString (Type type)
 Converts terrain generator type enumeration into a string. More...
 
- Protected Attributes inherited from QgsTerrainGenerator
QgsTerrainEntity * mTerrain = nullptr
 
QgsTilingScheme mTerrainTilingScheme
 Tiling scheme of the terrain. More...
 

Detailed Description

3 Implementation of terrain generator that uses online resources to download heightmaps.

Since
QGIS 3.8

Definition at line 32 of file qgsonlineterraingenerator.h.

Constructor & Destructor Documentation

◆ QgsOnlineTerrainGenerator()

QgsOnlineTerrainGenerator::QgsOnlineTerrainGenerator ( )
default

Constructor for QgsOnlineTerrainGenerator.

◆ ~QgsOnlineTerrainGenerator()

QgsOnlineTerrainGenerator::~QgsOnlineTerrainGenerator ( )
overridedefault

Member Function Documentation

◆ clone()

QgsTerrainGenerator * QgsOnlineTerrainGenerator::clone ( ) const
overridevirtual

Makes a copy of the current instance.

Implements QgsTerrainGenerator.

Definition at line 30 of file qgsonlineterraingenerator.cpp.

◆ createChunkLoader()

QgsChunkLoader * QgsOnlineTerrainGenerator::createChunkLoader ( QgsChunkNode *  node) const
override

Definition at line 25 of file qgsonlineterraingenerator.cpp.

◆ crs()

QgsCoordinateReferenceSystem QgsOnlineTerrainGenerator::crs ( ) const
inline

Returns CRS of the terrain.

Definition at line 45 of file qgsonlineterraingenerator.h.

◆ extent()

QgsRectangle QgsOnlineTerrainGenerator::extent ( ) const
overridevirtual

extent of the terrain in terrain's CRS

Implements QgsTerrainGenerator.

Definition at line 46 of file qgsonlineterraingenerator.cpp.

◆ heightAt()

float QgsOnlineTerrainGenerator::heightAt ( double  x,
double  y,
const Qgs3DMapSettings map 
) const
overridevirtual

Returns height at (x,y) in terrain's CRS.

Reimplemented from QgsTerrainGenerator.

Definition at line 51 of file qgsonlineterraingenerator.cpp.

◆ heightMapGenerator()

QgsDemHeightMapGenerator* QgsOnlineTerrainGenerator::heightMapGenerator ( )
inline

Returns height map generator object - takes care of extraction of elevations from the layer)

Definition at line 58 of file qgsonlineterraingenerator.h.

◆ readXml()

void QgsOnlineTerrainGenerator::readXml ( const QDomElement &  elem)
overridevirtual

Read terrain generator's configuration from XML.

Implements QgsTerrainGenerator.

Definition at line 75 of file qgsonlineterraingenerator.cpp.

◆ resolution()

int QgsOnlineTerrainGenerator::resolution ( ) const
inline

Returns resolution of the generator (how many elevation samples on one side of a terrain tile)

Definition at line 50 of file qgsonlineterraingenerator.h.

◆ setCrs()

void QgsOnlineTerrainGenerator::setCrs ( const QgsCoordinateReferenceSystem crs,
const QgsCoordinateTransformContext context 
)

Sets CRS of the terrain.

Definition at line 91 of file qgsonlineterraingenerator.cpp.

◆ setExtent()

void QgsOnlineTerrainGenerator::setExtent ( const QgsRectangle extent)

Sets extent of the terrain.

Definition at line 98 of file qgsonlineterraingenerator.cpp.

◆ setResolution()

void QgsOnlineTerrainGenerator::setResolution ( int  resolution)
inline

Sets resolution of the generator (how many elevation samples on one side of a terrain tile)

Definition at line 48 of file qgsonlineterraingenerator.h.

◆ setSkirtHeight()

void QgsOnlineTerrainGenerator::setSkirtHeight ( float  skirtHeight)
inline

Sets skirt height (in world units). Skirts at the edges of terrain tiles help hide cracks between adjacent tiles.

Definition at line 53 of file qgsonlineterraingenerator.h.

◆ skirtHeight()

float QgsOnlineTerrainGenerator::skirtHeight ( ) const
inline

Returns skirt height (in world units). Skirts at the edges of terrain tiles help hide cracks between adjacent tiles.

Definition at line 55 of file qgsonlineterraingenerator.h.

◆ type()

QgsTerrainGenerator::Type QgsOnlineTerrainGenerator::type ( ) const
overridevirtual

What texture generator implementation is this.

Implements QgsTerrainGenerator.

Definition at line 41 of file qgsonlineterraingenerator.cpp.

◆ writeXml()

void QgsOnlineTerrainGenerator::writeXml ( QDomElement &  elem) const
overridevirtual

Write terrain generator's configuration to XML.

Implements QgsTerrainGenerator.

Definition at line 60 of file qgsonlineterraingenerator.cpp.


The documentation for this class was generated from the following files: