16#ifndef QGSTERRAINENTITY_P_H
17#define QGSTERRAINENTITY_P_H
44class QgsTerrainTextureGenerator;
48class TerrainMapUpdateJobFactory;
56class QgsTerrainEntity :
public QgsChunkedEntity
61 explicit QgsTerrainEntity(
const Qgs3DMapSettings &map, Qt3DCore::QNode *parent =
nullptr );
63 ~QgsTerrainEntity()
override;
68 QgsTerrainTextureGenerator *textureGenerator() {
return mTextureGenerator; }
71 Qt3DCore::QTransform *transform()
const {
return mTerrainTransform; }
73 float terrainElevationOffset()
const;
75 QVector<QgsRayCastingUtils::RayHit> rayIntersection(
const QgsRayCastingUtils::Ray3D &ray,
const QgsRayCastingUtils::RayCastContext &context )
const override;
78 void onShowBoundingBoxesChanged();
79 void invalidateMapImages();
80 void onLayersChanged();
81 void onTerrainElevationOffsetChanged(
float newOffset );
85 void connectToLayersRepaintRequest();
88 QgsTerrainTextureGenerator *mTextureGenerator =
nullptr;
89 Qt3DCore::QTransform *mTerrainTransform =
nullptr;
91 std::unique_ptr<TerrainMapUpdateJobFactory> mUpdateJobFactory;
94 QList<QgsMapLayer *> mLayers;
100class TerrainMapUpdateJob :
public QgsChunkQueueJob
104 TerrainMapUpdateJob( QgsTerrainTextureGenerator *textureGenerator, QgsChunkNode *mNode );
106 void cancel()
override;
109 void onTileReady(
int jobId,
const QImage &image );
112 QgsTerrainTextureGenerator *mTextureGenerator =
nullptr;
Base class for all map layer types.