QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsQuantizedMeshTerrainGenerator Class Reference

3 More...

#include <qgsquantizedmeshterraingenerator.h>

Inheritance diagram for QgsQuantizedMeshTerrainGenerator:
Inheritance graph
[legend]

Public Member Functions

 QgsQuantizedMeshTerrainGenerator ()
 
virtual QgsTerrainGeneratorclone () const override
 Makes a copy of the current instance.
 
virtual QVector< QgsChunkNode * > createChildren (QgsChunkNode *node) const override
 
virtual QgsChunkLoader * createChunkLoader (QgsChunkNode *node) const override
 
virtual QgsChunkNode * createRootNode () const override
 
virtual float heightAt (double x, double y, const Qgs3DRenderContext &context) const override
 Returns height at (x,y) in map's CRS.
 
QgsTiledSceneLayerlayer () const
 Returns the layer we take tiles from.
 
virtual void readXml (const QDomElement &elem) override
 Read terrain generator's configuration from XML.
 
virtual void resolveReferences (const QgsProject &project) override
 After read of XML, resolve references to any layers that have been read as layer IDs.
 
virtual float rootChunkError (const Qgs3DMapSettings &map) const override
 Returns error of the root chunk in world coordinates.
 
virtual QgsRectangle rootChunkExtent () const override
 extent of the terrain's root chunk in terrain's CRS
 
virtual void rootChunkHeightRange (float &hMin, float &hMax) const override
 Returns height range of the root chunk in world coordinates.
 
virtual void setExtent (const QgsRectangle &extent) override
 sets the extent of the terrain in terrain's CRS
 
bool setLayer (QgsTiledSceneLayer *layer)
 Set layer to take tiles from.
 
virtual void setTerrain (QgsTerrainEntity *t) override
 Sets terrain entity for the generator (does not transfer ownership)
 
virtual QgsTerrainGenerator::Type type () const override
 What texture generator implementation is this.
 
virtual void writeXml (QDomElement &elem) const override
 Write terrain generator's configuration to XML.
 
- Public Member Functions inherited from QgsTerrainGenerator
virtual QgsCoordinateReferenceSystem crs () const
 Returns CRS of the terrain.
 
virtual QgsRectangle extent () const
 extent of the terrain in terrain's CRS, might be non-square and smaller than rootChunkExtent()
 
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.
 
const QgsTilingSchemetilingScheme () const
 Returns tiling scheme of the terrain.
 

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)
 
- Static Public Member Functions inherited from QgsTerrainGenerator
static QString typeToString (Type type)
 Converts terrain generator type enumeration into a string.
 
- Protected Attributes inherited from QgsTerrainGenerator
QgsRectangle mExtent
 
bool mIsValid = true
 
QgsTerrainEntity * mTerrain = nullptr
 
QgsTilingScheme mTerrainTilingScheme
 Tiling scheme of the terrain.
 

Detailed Description

3

Terrain generator using a Quantized Mesh tile layer

Since
QGIS 3.40

Definition at line 36 of file qgsquantizedmeshterraingenerator.h.

Constructor & Destructor Documentation

◆ QgsQuantizedMeshTerrainGenerator()

QgsQuantizedMeshTerrainGenerator::QgsQuantizedMeshTerrainGenerator ( )
inline

Definition at line 40 of file qgsquantizedmeshterraingenerator.h.

Member Function Documentation

◆ clone()

QgsTerrainGenerator * QgsQuantizedMeshTerrainGenerator::clone ( ) const
overridevirtual

Makes a copy of the current instance.

Implements QgsTerrainGenerator.

Definition at line 213 of file qgsquantizedmeshterraingenerator.cpp.

◆ createChildren()

QVector< QgsChunkNode * > QgsQuantizedMeshTerrainGenerator::createChildren ( QgsChunkNode *  node) const
overridevirtual

Definition at line 314 of file qgsquantizedmeshterraingenerator.cpp.

◆ createChunkLoader()

QgsChunkLoader * QgsQuantizedMeshTerrainGenerator::createChunkLoader ( QgsChunkNode *  node) const
overridevirtual

Definition at line 300 of file qgsquantizedmeshterraingenerator.cpp.

◆ createRootNode()

QgsChunkNode * QgsQuantizedMeshTerrainGenerator::createRootNode ( ) const
overridevirtual

Definition at line 306 of file qgsquantizedmeshterraingenerator.cpp.

◆ heightAt()

float QgsQuantizedMeshTerrainGenerator::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 249 of file qgsquantizedmeshterraingenerator.cpp.

◆ layer()

QgsTiledSceneLayer * QgsQuantizedMeshTerrainGenerator::layer ( ) const

Returns the layer we take tiles from.

Definition at line 372 of file qgsquantizedmeshterraingenerator.cpp.

◆ readXml()

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

Read terrain generator's configuration from XML.

Implements QgsTerrainGenerator.

Definition at line 287 of file qgsquantizedmeshterraingenerator.cpp.

◆ resolveReferences()

void QgsQuantizedMeshTerrainGenerator::resolveReferences ( const QgsProject project)
overridevirtual

After read of XML, resolve references to any layers that have been read as layer IDs.

Reimplemented from QgsTerrainGenerator.

Definition at line 294 of file qgsquantizedmeshterraingenerator.cpp.

◆ rootChunkError()

float QgsQuantizedMeshTerrainGenerator::rootChunkError ( const Qgs3DMapSettings map) const
overridevirtual

Returns error of the root chunk in world coordinates.

Reimplemented from QgsTerrainGenerator.

Definition at line 238 of file qgsquantizedmeshterraingenerator.cpp.

◆ rootChunkExtent()

QgsRectangle QgsQuantizedMeshTerrainGenerator::rootChunkExtent ( ) const
overridevirtual

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

Implements QgsTerrainGenerator.

Definition at line 233 of file qgsquantizedmeshterraingenerator.cpp.

◆ rootChunkHeightRange()

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

Returns height range of the root chunk in world coordinates.

Reimplemented from QgsTerrainGenerator.

Definition at line 244 of file qgsquantizedmeshterraingenerator.cpp.

◆ setExtent()

void QgsQuantizedMeshTerrainGenerator::setExtent ( const QgsRectangle extent)
overridevirtual

sets the extent of the terrain in terrain's CRS

Reimplemented from QgsTerrainGenerator.

Definition at line 228 of file qgsquantizedmeshterraingenerator.cpp.

◆ setLayer()

bool QgsQuantizedMeshTerrainGenerator::setLayer ( QgsTiledSceneLayer layer)

Set layer to take tiles from.

Returns
true on success

Definition at line 348 of file qgsquantizedmeshterraingenerator.cpp.

◆ setTerrain()

void QgsQuantizedMeshTerrainGenerator::setTerrain ( QgsTerrainEntity *  t)
overridevirtual

Sets terrain entity for the generator (does not transfer ownership)

Reimplemented from QgsTerrainGenerator.

Definition at line 203 of file qgsquantizedmeshterraingenerator.cpp.

◆ type()

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

What texture generator implementation is this.

Implements QgsTerrainGenerator.

Definition at line 223 of file qgsquantizedmeshterraingenerator.cpp.

◆ writeXml()

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

Write terrain generator's configuration to XML.

Implements QgsTerrainGenerator.

Definition at line 280 of file qgsquantizedmeshterraingenerator.cpp.


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