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();
81 void connectToLayersRepaintRequest();
83 QgsTerrainTextureGenerator *mTextureGenerator =
nullptr;
84 Qt3DCore::QTransform *mTerrainTransform =
nullptr;
86 std::unique_ptr<TerrainMapUpdateJobFactory> mUpdateJobFactory;
89 QList<QgsMapLayer *> mLayers;
94class TerrainMapUpdateJob :
public QgsChunkQueueJob
98 TerrainMapUpdateJob( QgsTerrainTextureGenerator *textureGenerator, QgsChunkNode *mNode );
100 void cancel()
override;
103 void onTileReady(
int jobId,
const QImage &image );
106 QgsTerrainTextureGenerator *mTextureGenerator =
nullptr;
Base class for all map layer types.
Helper struct to store ray casting parameters.