16#ifndef QGSTERRAINENTITY_H
17#define QGSTERRAINENTITY_H
44class QgsTerrainTextureGenerator;
48class TerrainMapUpdateJobFactory;
55class QgsTerrainEntity :
public QgsChunkedEntity
60 explicit QgsTerrainEntity(
Qgs3DMapSettings *map, Qt3DCore::QNode *parent =
nullptr );
62 ~QgsTerrainEntity()
override;
65 QgsTerrainTextureGenerator *textureGenerator() {
return mTextureGenerator; }
68 Qt3DCore::QTransform *transform()
const {
return mTerrainTransform; }
70 float terrainElevationOffset()
const;
75 void onShowBoundingBoxesChanged();
76 void invalidateMapImages();
77 void onLayersChanged();
78 void onTerrainElevationOffsetChanged(
float newOffset );
82 void connectToLayersRepaintRequest();
84 QgsTerrainTextureGenerator *mTextureGenerator =
nullptr;
85 Qt3DCore::QTransform *mTerrainTransform =
nullptr;
87 std::unique_ptr<TerrainMapUpdateJobFactory> mUpdateJobFactory;
90 QList<QgsMapLayer *> mLayers;
96class TerrainMapUpdateJob :
public QgsChunkQueueJob
100 TerrainMapUpdateJob( QgsTerrainTextureGenerator *textureGenerator, QgsChunkNode *mNode );
102 void cancel()
override;
105 void onTileReady(
int jobId,
const QImage &image );
108 QgsTerrainTextureGenerator *mTextureGenerator =
nullptr;
Base class for all map layer types.
Helper struct to store ray casting parameters.