16 #ifndef QGSTERRAINENTITY_P_H 17 #define QGSTERRAINENTITY_P_H 40 namespace QgsRayCastingUtils
46 class QgsTerrainTextureGenerator;
50 class TerrainMapUpdateJobFactory;
58 class QgsTerrainEntity :
public QgsChunkedEntity
63 explicit QgsTerrainEntity(
int maxLevel,
const Qgs3DMapSettings &map, Qt3DCore::QNode *parent =
nullptr );
65 ~QgsTerrainEntity()
override;
70 QgsTerrainTextureGenerator *textureGenerator() {
return mTextureGenerator; }
75 Qt3DRender::QObjectPicker *terrainPicker()
const {
return mTerrainPicker; }
78 bool rayIntersection(
const QgsRayCastingUtils::Ray3D &ray, QVector3D &intersectionPoint );
81 void onShowBoundingBoxesChanged();
82 void invalidateMapImages();
83 void onLayersChanged();
87 void connectToLayersRepaintRequest();
91 Qt3DRender::QObjectPicker *mTerrainPicker =
nullptr;
92 QgsTerrainTextureGenerator *mTextureGenerator =
nullptr;
95 std::unique_ptr<TerrainMapUpdateJobFactory> mUpdateJobFactory;
98 QList<QgsMapLayer *> mLayers;
104 class TerrainMapUpdateJob :
public QgsChunkQueueJob
108 TerrainMapUpdateJob( QgsTerrainTextureGenerator *textureGenerator, QgsChunkNode *mNode );
110 void cancel()
override;
113 void onTileReady(
int jobId,
const QImage &image );
116 QgsTerrainTextureGenerator *mTextureGenerator =
nullptr;
122 #endif // QGSTERRAINENTITY_P_H Base class for all map layer types.
3 Definition of the world
3 Base class for generators of terrain.