QGIS API Documentation 4.3.0-Master (16eddb2670e)
Loading...
Searching...
No Matches
QgsQuantizedMeshTerrainGenerator Class Reference

Terrain generator using a Quantized Mesh tile layer. More...

#include <qgsquantizedmeshterraingenerator.h>

Inheritance diagram for QgsQuantizedMeshTerrainGenerator:

Public Member Functions

 QgsQuantizedMeshTerrainGenerator ()
QgsTerrainGenerator * clone () const override
 Makes a copy of the current instance.
QFuture< QVector< QgsChunkNode * > > createChildren (QgsChunkNode *node) override
QgsChunkNode * createRootNode () const override
float heightAt (double x, double y, const Qgs3DRenderContext &context) const override
 Returns height at (x,y) in map's CRS.
QgsTiledSceneLayer * layer () const
 Returns the layer we take tiles from.
QFuture< QgsChunkLoaderResult > loadChunk (QgsChunkNode *node) override
float rootChunkError (const Qgs3DMapSettings &map) const override
 Returns error of the root chunk in world coordinates.
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 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.
void setTerrain (QgsTerrainEntity *t) override
 Sets terrain entity for the generator (does not transfer ownership).
QgsTerrainGenerator::Type type () const override
 What texture generator implementation is this.
Public Member Functions inherited from QgsTerrainGenerator
 QgsTerrainGenerator ()
 Create new terrain generator.
 ~QgsTerrainGenerator () override
virtual QgsTerrainGenerator::Capabilities capabilities () const
 Returns flags containing the supported capabilities.
virtual QgsCoordinateReferenceSystem crs () const
 Returns CRS of the terrain.
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 void setCrs (const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context)
 Sets the CRS associated with the terrain.
const QgsTilingScheme & tilingScheme () const
 Returns tiling scheme of the terrain.
QFuture< QgsChunkLoaderResult > updateChunk (QgsChunkNode *node) override

Static Public Member Functions

static QgsTerrainGenerator * create ()
 Creates a new instance of a QgsQuantizedMeshTerrainGenerator 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
typedef QFlags< Capability > Capabilities
enum class  Capability : int { NoCapabilities = 1 << 0 , SupportsTileResolution = 1 << 1 }
 Specific capabilities of the terrain generator. More...
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 Member Functions inherited from QgsTerrainGenerator
void applyMaterial (const TerrainTextureResources &resources, QgsTerrainTileEntity *entity, bool isShadingEnabled, const QgsPhongMaterialSettings &shadingMaterial, bool useTexture, const Qgs3DRenderContext &context)
 Creates material component for the entity with the rendered map as a texture.
Qt3DRender::QTexture2D * applyTexture (QgsTerrainTileEntity *entity, const QgsMaterialContext &context, const TerrainTextureResources &resources) const
 Creates a new texture that is linked to the entity.
QFuture< TerrainTextureResources > loadTextureResources (QgsChunkNode *node)
 Asynchronously loads resources for creating texture.
Protected Attributes inherited from QgsTerrainGenerator
QgsRectangle mExtent
bool mIsValid = true
QgsTerrainEntity * mTerrain = nullptr
QgsTilingScheme mTerrainTilingScheme
 Tiling scheme of the terrain.

Detailed Description

Terrain generator using a Quantized Mesh tile layer.

Since
QGIS 3.40

Definition at line 40 of file qgsquantizedmeshterraingenerator.h.

Constructor & Destructor Documentation

◆ QgsQuantizedMeshTerrainGenerator()

QgsQuantizedMeshTerrainGenerator::QgsQuantizedMeshTerrainGenerator ( )
inline

Definition at line 49 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 71 of file qgsquantizedmeshterraingenerator.cpp.

◆ create()

QgsTerrainGenerator * QgsQuantizedMeshTerrainGenerator::create ( )
static

Creates a new instance of a QgsQuantizedMeshTerrainGenerator object.

Definition at line 60 of file qgsquantizedmeshterraingenerator.cpp.

◆ createChildren()

QFuture< QVector< QgsChunkNode * > > QgsQuantizedMeshTerrainGenerator::createChildren ( QgsChunkNode * node)
override

Definition at line 278 of file qgsquantizedmeshterraingenerator.cpp.

◆ createRootNode()

QgsChunkNode * QgsQuantizedMeshTerrainGenerator::createRootNode ( ) const
override

Definition at line 269 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.

Implements QgsTerrainGenerator.

Definition at line 107 of file qgsquantizedmeshterraingenerator.cpp.

◆ layer()

QgsTiledSceneLayer * QgsQuantizedMeshTerrainGenerator::layer ( ) const

Returns the layer we take tiles from.

Definition at line 327 of file qgsquantizedmeshterraingenerator.cpp.

◆ loadChunk()

QFuture< QgsChunkLoaderResult > QgsQuantizedMeshTerrainGenerator::loadChunk ( QgsChunkNode * node)
override

Definition at line 138 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 96 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 91 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 102 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 86 of file qgsquantizedmeshterraingenerator.cpp.

◆ setLayer()

bool QgsQuantizedMeshTerrainGenerator::setLayer ( QgsTiledSceneLayer * layer)

Set layer to take tiles from.

Returns
true on success

Definition at line 303 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 65 of file qgsquantizedmeshterraingenerator.cpp.

◆ type()

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

What texture generator implementation is this.

Implements QgsTerrainGenerator.

Definition at line 81 of file qgsquantizedmeshterraingenerator.cpp.


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