16 #ifndef QGS3DMAPSCENE_H
17 #define QGS3DMAPSCENE_H
21 #include <Qt3DCore/QEntity>
27 class QRenderSettings;
40 class QForwardRenderer;
49 class QgsTerrainEntity;
50 class QgsChunkedEntity;
76 int terrainPendingJobsCount()
const;
82 int totalPendingJobsCount()
const;
103 float worldSpaceError(
float epsilon,
float distance );
107 void terrainEntityChanged();
109 void terrainPendingJobsCountChanged();
115 void totalPendingJobsCountChanged();
117 void sceneStateChanged();
121 void updateTemporal();
124 void onCameraChanged();
125 void onFrameTriggered(
float dt );
126 void createTerrain();
127 void onLayerRenderer3DChanged();
128 void onLayersChanged();
129 void createTerrainDeferred();
130 void onBackgroundColorChanged();
131 void onLayerEntityPickedObject( Qt3DRender::QPickEvent *pickEvent,
QgsFeatureId fid );
133 void updateCameraLens();
134 void onRenderersChanged();
138 void addCameraViewCenterEntity( Qt3DRender::QCamera *camera );
139 void setSceneState( SceneState state );
140 void updateSceneState();
142 bool updateCameraNearFarPlanes();
143 void finalizeNewEntity( Qt3DCore::QEntity *newEntity );
144 int maximumTextureSize()
const;
150 Qt3DLogic::QFrameAction *mFrameAction =
nullptr;
152 QgsTerrainEntity *mTerrain =
nullptr;
153 QList<QgsChunkedEntity *> mChunkEntities;
155 Qt3DCore::QEntity *mEntityCameraViewCenter =
nullptr;
157 QMap<QgsMapLayer *, Qt3DCore::QEntity *> mLayerEntities;
158 QMap<const QgsAbstract3DRenderer *, Qt3DCore::QEntity *> mRenderersEntities;
159 bool mTerrainUpdateScheduled =
false;
160 SceneState mSceneState = Ready;
162 QList<Qgs3DMapScenePickHandler *> mPickHandlers;
164 QList<Qt3DCore::QEntity *> mLightEntities;
167 #endif // QGS3DMAPSCENE_H