QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
QgsFlatTerrainGenerator Class Reference

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

#include <qgsflatterraingenerator.h>

Inheritance diagram for QgsFlatTerrainGenerator:

Public Member Functions

 QgsFlatTerrainGenerator ()=default
QgsTerrainGeneratorclone () const override
 Makes a copy of the current instance.
QgsChunkLoader * createChunkLoader (QgsChunkNode *node) const override
QgsCoordinateReferenceSystem crs () const override
 Returns CRS of the terrain.
QgsRectangle rootChunkExtent () const override
 extent of the terrain's root chunk in terrain's CRS
void rootChunkHeightRange (float &hMin, float &hMax) const override
 Returns height range of the root chunk in world coordinates.
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
Type type () const override
 What texture generator implementation is this.
Public Member Functions inherited from QgsTerrainGenerator
virtual float heightAt (double x, double y, const Qgs3DRenderContext &context) const
 Returns height at (x,y) in map's CRS.
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 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 ()
 Creates a new instance of a QgsFlatTerrainGenerator 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

Terrain generator that creates a simple square flat area.

Definition at line 53 of file qgsflatterraingenerator.h.

Constructor & Destructor Documentation

◆ QgsFlatTerrainGenerator()

QgsFlatTerrainGenerator::QgsFlatTerrainGenerator ( )
default

Member Function Documentation

◆ clone()

QgsTerrainGenerator * QgsFlatTerrainGenerator::clone ( ) const
overridevirtual

Makes a copy of the current instance.

Implements QgsTerrainGenerator.

Definition at line 103 of file qgsflatterraingenerator.cpp.

◆ create()

QgsTerrainGenerator * QgsFlatTerrainGenerator::create ( )
static

Creates a new instance of a QgsFlatTerrainGenerator object.

Definition at line 93 of file qgsflatterraingenerator.cpp.

◆ createChunkLoader()

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

Definition at line 98 of file qgsflatterraingenerator.cpp.

◆ crs()

QgsCoordinateReferenceSystem QgsFlatTerrainGenerator::crs ( ) const
inlineoverridevirtual

Returns CRS of the terrain.

Reimplemented from QgsTerrainGenerator.

Definition at line 73 of file qgsflatterraingenerator.h.

◆ rootChunkExtent()

QgsRectangle QgsFlatTerrainGenerator::rootChunkExtent ( ) const
overridevirtual

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

Implements QgsTerrainGenerator.

Definition at line 117 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 122 of file qgsflatterraingenerator.cpp.

◆ setCrs()

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

Sets the CRS associated with the terrain.

See also
crs()

Reimplemented from QgsTerrainGenerator.

Definition at line 128 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 134 of file qgsflatterraingenerator.cpp.

◆ type()

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

What texture generator implementation is this.

Implements QgsTerrainGenerator.

Definition at line 112 of file qgsflatterraingenerator.cpp.


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