QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
QgsOnlineTerrainGenerator Class Reference

3 More...

#include <qgsonlineterraingenerator.h>

Inheritance diagram for QgsOnlineTerrainGenerator:
Inheritance graph
[legend]

Public Member Functions

 QgsOnlineTerrainGenerator ()
 
 ~QgsOnlineTerrainGenerator () override
 
QgsTerrainGeneratorclone () const override SIP_FACTORY
 Makes a copy of the current instance.
 
QgsChunkLoader * createChunkLoader (QgsChunkNode *node) const override SIP_FACTORY
 
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)
 
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 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 QgsTilingSchemetilingScheme () const
 Returns tiling scheme of the terrain.
 

Static Public Member Functions

static QgsTerrainGeneratorcreate () SIP_FACTORY
 Creates a new instance of a QgsOnlineTerrainGenerator 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.
 

Detailed Description

3

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

Note
Not available in Python bindings
Since
QGIS 3.8

Definition at line 37 of file qgsonlineterraingenerator.h.

Constructor & Destructor Documentation

◆ QgsOnlineTerrainGenerator()

QgsOnlineTerrainGenerator::QgsOnlineTerrainGenerator ( )
default

◆ ~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 31 of file qgsonlineterraingenerator.cpp.

◆ create()

QgsTerrainGenerator * QgsOnlineTerrainGenerator::create ( )
static

Creates a new instance of a QgsOnlineTerrainGenerator object.

Definition at line 62 of file qgsonlineterraingenerator.cpp.

◆ createChunkLoader()

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

Definition at line 26 of file qgsonlineterraingenerator.cpp.

◆ crs()

QgsCoordinateReferenceSystem QgsOnlineTerrainGenerator::crs ( ) const
inlineoverridevirtual

Returns CRS of the terrain.

Reimplemented from QgsTerrainGenerator.

Definition at line 50 of file qgsonlineterraingenerator.h.

◆ heightAt()

float QgsOnlineTerrainGenerator::heightAt ( double  x,
double  y,
const Qgs3DRenderContext context 
) const
overridevirtual

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

Reimplemented from QgsTerrainGenerator.

Definition at line 53 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 67 of file qgsonlineterraingenerator.h.

◆ 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 59 of file qgsonlineterraingenerator.h.

◆ rootChunkExtent()

QgsRectangle QgsOnlineTerrainGenerator::rootChunkExtent ( ) const
overridevirtual

extent of the terrain's root chunk in terrain's CRS

Implements QgsTerrainGenerator.

Definition at line 48 of file qgsonlineterraingenerator.cpp.

◆ setCrs()

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

Sets the CRS associated with the terrain.

See also
crs()

Reimplemented from QgsTerrainGenerator.

Definition at line 67 of file qgsonlineterraingenerator.cpp.

◆ setExtent()

void QgsOnlineTerrainGenerator::setExtent ( const QgsRectangle extent)
overridevirtual

sets the extent of the terrain in terrain's CRS

Reimplemented from QgsTerrainGenerator.

Definition at line 74 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 53 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 62 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 64 of file qgsonlineterraingenerator.h.

◆ type()

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

What texture generator implementation is this.

Implements QgsTerrainGenerator.

Definition at line 43 of file qgsonlineterraingenerator.cpp.


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