16 #ifndef QGSTERRAINENTITY_P_H
17 #define QGSTERRAINENTITY_P_H
42 namespace QgsRayCastingUtils
48 class QgsTerrainTextureGenerator;
52 class TerrainMapUpdateJobFactory;
60 class QgsTerrainEntity :
public QgsChunkedEntity
65 explicit QgsTerrainEntity(
int maxLevel,
const Qgs3DMapSettings &map, Qt3DCore::QNode *parent =
nullptr );
67 ~QgsTerrainEntity()
override;
72 QgsTerrainTextureGenerator *textureGenerator() {
return mTextureGenerator; }
77 Qt3DRender::QObjectPicker *terrainPicker()
const {
return mTerrainPicker; }
80 bool rayIntersection(
const QgsRayCastingUtils::Ray3D &ray, QVector3D &intersectionPoint );
83 void onShowBoundingBoxesChanged();
84 void invalidateMapImages();
85 void onLayersChanged();
89 void connectToLayersRepaintRequest();
93 Qt3DRender::QObjectPicker *mTerrainPicker =
nullptr;
94 QgsTerrainTextureGenerator *mTextureGenerator =
nullptr;
97 std::unique_ptr<TerrainMapUpdateJobFactory> mUpdateJobFactory;
100 QList<QgsMapLayer *> mLayers;
106 class TerrainMapUpdateJob :
public QgsChunkQueueJob
110 TerrainMapUpdateJob( QgsTerrainTextureGenerator *textureGenerator, QgsChunkNode *mNode );
112 void cancel()
override;
115 void onTileReady(
int jobId,
const QImage &image );
118 QgsTerrainTextureGenerator *mTextureGenerator =
nullptr;
124 #endif // QGSTERRAINENTITY_P_H