QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
Public Member Functions | List of all members
QgsFlatTerrainGenerator Class Reference

Terrain generator that creates a simple square flat area. More...

#include <qgsflatterraingenerator.h>

Inheritance diagram for QgsFlatTerrainGenerator:
Inheritance graph
[legend]

Public Member Functions

 QgsFlatTerrainGenerator ()=default
 Creates flat terrain generator object. More...
 
QgsTerrainGeneratorclone () const override SIP_FACTORY
 Makes a copy of the current instance. More...
 
QgsChunkLoader * createChunkLoader (QgsChunkNode *node) const override SIP_FACTORY
 
QgsCoordinateReferenceSystem crs () const
 Returns CRS of the terrain. More...
 
QgsRectangle extent () const override
 extent of the terrain in terrain's CRS More...
 
void readXml (const QDomElement &elem) override
 Read terrain generator's configuration from XML. More...
 
void rootChunkHeightRange (float &hMin, float &hMax) const override
 Returns height range of the root chunk in world coordinates. More...
 
void setCrs (const QgsCoordinateReferenceSystem &crs)
 Sets CRS of the terrain. More...
 
void setExtent (const QgsRectangle &extent) override
 sets the extent of the terrain in terrain's CRS 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 float heightAt (double x, double y, const Qgs3DMapSettings &map) const
 Returns height at (x,y) in terrain's CRS. More...
 
bool isValid () const
 Returns whether the terrain generator is valid. 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...
 
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, Mesh }
 Enumeration of the available terrain generators. More...
 
- Signals inherited from QgsTerrainGenerator
void extentChanged ()
 Emitted when the terrain extent has changed. More...
 
void terrainChanged ()
 Emitted when the terrain changed (for example, raster DEM or mesh have data changed) 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
bool mIsValid = true
 
QgsTerrainEntity * mTerrain = nullptr
 
QgsTilingScheme mTerrainTilingScheme
 Tiling scheme of the terrain. More...
 

Detailed Description

Terrain generator that creates a simple square flat area.

3

Since
QGIS 3.0

Definition at line 53 of file qgsflatterraingenerator.h.

Constructor & Destructor Documentation

◆ QgsFlatTerrainGenerator()

QgsFlatTerrainGenerator::QgsFlatTerrainGenerator ( )
default

Creates flat terrain generator object.

Member Function Documentation

◆ clone()

QgsTerrainGenerator * QgsFlatTerrainGenerator::clone ( ) const
overridevirtual

Makes a copy of the current instance.

Implements QgsTerrainGenerator.

Definition at line 86 of file qgsflatterraingenerator.cpp.

◆ createChunkLoader()

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

Definition at line 81 of file qgsflatterraingenerator.cpp.

◆ crs()

QgsCoordinateReferenceSystem QgsFlatTerrainGenerator::crs ( ) const
inline

Returns CRS of the terrain.

Definition at line 73 of file qgsflatterraingenerator.h.

◆ extent()

QgsRectangle QgsFlatTerrainGenerator::extent ( ) const
overridevirtual

extent of the terrain in terrain's CRS

Implements QgsTerrainGenerator.

Definition at line 100 of file qgsflatterraingenerator.cpp.

◆ readXml()

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

Read terrain generator's configuration from XML.

Implements QgsTerrainGenerator.

Definition at line 124 of file qgsflatterraingenerator.cpp.

◆ rootChunkHeightRange()

void QgsFlatTerrainGenerator::rootChunkHeightRange ( float &  hMin,
float &  hMax 
) const
overridevirtual

Returns height range of the root chunk in world coordinates.

Reimplemented from QgsTerrainGenerator.

Definition at line 105 of file qgsflatterraingenerator.cpp.

◆ setCrs()

void QgsFlatTerrainGenerator::setCrs ( const QgsCoordinateReferenceSystem crs)

Sets CRS of the terrain.

Definition at line 137 of file qgsflatterraingenerator.cpp.

◆ setExtent()

void QgsFlatTerrainGenerator::setExtent ( const QgsRectangle extent)
overridevirtual

sets the extent of the terrain in terrain's CRS

Reimplemented from QgsTerrainGenerator.

Definition at line 143 of file qgsflatterraingenerator.cpp.

◆ type()

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

What texture generator implementation is this.

Implements QgsTerrainGenerator.

Definition at line 95 of file qgsflatterraingenerator.cpp.

◆ writeXml()

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

Write terrain generator's configuration to XML.

Implements QgsTerrainGenerator.

Definition at line 111 of file qgsflatterraingenerator.cpp.


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