16 #ifndef QGSTERRAINENTITY_P_H
17 #define QGSTERRAINENTITY_P_H
47 namespace QgsRayCastingUtils
53 class QgsTerrainTextureGenerator;
57 class TerrainMapUpdateJobFactory;
65 class QgsTerrainEntity :
public QgsChunkedEntity
70 explicit QgsTerrainEntity(
const Qgs3DMapSettings &map, Qt3DCore::QNode *parent =
nullptr );
72 ~QgsTerrainEntity()
override;
77 QgsTerrainTextureGenerator *textureGenerator() {
return mTextureGenerator; }
82 Qt3DRender::QObjectPicker *terrainPicker()
const {
return mTerrainPicker; }
84 Qt3DCore::QTransform *transform()
const {
return mTerrainTransform; }
86 float terrainElevationOffset()
const;
89 bool rayIntersection(
const QgsRayCastingUtils::Ray3D &ray, QVector3D &intersectionPoint );
92 void onShowBoundingBoxesChanged();
93 void invalidateMapImages();
94 void onLayersChanged();
95 void onTerrainElevationOffsetChanged(
float newOffset );
99 void connectToLayersRepaintRequest();
103 Qt3DRender::QObjectPicker *mTerrainPicker =
nullptr;
104 QgsTerrainTextureGenerator *mTextureGenerator =
nullptr;
106 Qt3DCore::QTransform *mTerrainTransform =
nullptr;
108 std::unique_ptr<TerrainMapUpdateJobFactory> mUpdateJobFactory;
111 QList<QgsMapLayer *> mLayers;
117 class TerrainMapUpdateJob :
public QgsChunkQueueJob
121 TerrainMapUpdateJob( QgsTerrainTextureGenerator *textureGenerator, QgsChunkNode *mNode );
123 void cancel()
override;
126 void onTileReady(
int jobId,
const QImage &image );
129 QgsTerrainTextureGenerator *mTextureGenerator =
nullptr;
Base class for all map layer types.