16 #ifndef QGS3DMAPSCENE_H
17 #define QGS3DMAPSCENE_H
21 #include <Qt3DCore/QEntity>
30 class QRenderSettings;
43 class QForwardRenderer;
53 class QgsTerrainEntity;
54 class QgsChunkedEntity;
97 QVector<QgsPointXY> viewFrustum2DExtent();
100 int terrainPendingJobsCount()
const;
106 int totalPendingJobsCount()
const;
127 float worldSpaceError(
float epsilon,
float distance );
162 void terrainEntityChanged();
164 void terrainPendingJobsCountChanged();
170 void totalPendingJobsCountChanged();
172 void sceneStateChanged();
175 void fpsCountChanged(
float fpsCount );
177 void fpsCounterEnabledChanged(
bool fpsCounterEnabled );
184 void viewed2DExtentFrom3DChanged( QVector<QgsPointXY> extent );
188 void updateTemporal();
191 void onCameraChanged();
192 void onFrameTriggered(
float dt );
193 void createTerrain();
194 void onLayerRenderer3DChanged();
195 void onLayersChanged();
196 void createTerrainDeferred();
197 void onBackgroundColorChanged();
198 void onLayerEntityPickedObject( Qt3DRender::QPickEvent *pickEvent,
QgsFeatureId fid );
200 void updateCameraLens();
201 void onRenderersChanged();
202 void onSkyboxSettingsChanged();
203 void onShadowSettingsChanged();
204 void onEyeDomeShadingSettingsChanged();
205 void onDebugShadowMapSettingsChanged();
206 void onDebugDepthMapSettingsChanged();
207 void onCameraMovementSpeedChanged();
208 void onCameraNavigationModeChanged();
209 void onDebugOverlayEnabledChanged();
211 void on3DAxisSettingsChanged();
213 bool updateCameraNearFarPlanes();
218 void addCameraViewCenterEntity( Qt3DRender::QCamera *camera );
220 void setSceneState( SceneState state );
221 void updateSceneState();
223 void finalizeNewEntity( Qt3DCore::QEntity *newEntity );
224 int maximumTextureSize()
const;
230 Qt3DLogic::QFrameAction *mFrameAction =
nullptr;
232 QgsTerrainEntity *mTerrain =
nullptr;
233 QList<QgsChunkedEntity *> mChunkEntities;
235 Qt3DCore::QEntity *mEntityCameraViewCenter =
nullptr;
237 QMap<QgsMapLayer *, Qt3DCore::QEntity *> mLayerEntities;
238 QMap<const QgsAbstract3DRenderer *, Qt3DCore::QEntity *> mRenderersEntities;
239 bool mTerrainUpdateScheduled =
false;
240 SceneState mSceneState = Ready;
242 QList<Qgs3DMapScenePickHandler *> mPickHandlers;
244 QList<Qt3DCore::QEntity *> mLightEntities;
245 QList<QgsMapLayer *> mModelVectorLayers;
248 Qt3DCore::QEntity *mEntityRotationCenter =
nullptr;
255 #endif // QGS3DMAPSCENE_H