16 #ifndef QGS3DMAPSCENE_H
17 #define QGS3DMAPSCENE_H
21 #include <Qt3DCore/QEntity>
30 class QRenderSettings;
43 class QForwardRenderer;
52 class QgsTerrainEntity;
53 class QgsChunkedEntity;
85 int terrainPendingJobsCount()
const;
91 int totalPendingJobsCount()
const;
112 float worldSpaceError(
float epsilon,
float distance );
151 void updateTemporal();
154 void onCameraChanged();
155 void onFrameTriggered(
float dt );
156 void createTerrain();
157 void onLayerRenderer3DChanged();
158 void onLayersChanged();
159 void createTerrainDeferred();
160 void onBackgroundColorChanged();
161 void onLayerEntityPickedObject( Qt3DRender::QPickEvent *pickEvent,
QgsFeatureId fid );
163 void updateCameraLens();
164 void onRenderersChanged();
165 void onSkyboxSettingsChanged();
166 void onShadowSettingsChanged();
167 void onEyeDomeShadingSettingsChanged();
168 void onDebugShadowMapSettingsChanged();
169 void onDebugDepthMapSettingsChanged();
170 void onCameraMovementSpeedChanged();
172 bool updateCameraNearFarPlanes();
177 void addCameraViewCenterEntity( Qt3DRender::QCamera *camera );
180 void updateSceneState();
182 void finalizeNewEntity( Qt3DCore::QEntity *newEntity );
183 int maximumTextureSize()
const;
189 Qt3DLogic::QFrameAction *mFrameAction =
nullptr;
191 QgsTerrainEntity *mTerrain =
nullptr;
192 QList<QgsChunkedEntity *> mChunkEntities;
194 Qt3DCore::QEntity *mEntityCameraViewCenter =
nullptr;
196 QMap<QgsMapLayer *, Qt3DCore::QEntity *> mLayerEntities;
197 QMap<const QgsAbstract3DRenderer *, Qt3DCore::QEntity *> mRenderersEntities;
198 bool mTerrainUpdateScheduled =
false;
201 QList<Qgs3DMapScenePickHandler *> mPickHandlers;
203 QList<Qt3DCore::QEntity *> mLightEntities;
205 QList<Qt3DCore::QEntity *> mLightOriginEntities;
206 QList<QgsMapLayer *> mModelVectorLayers;
209 Qt3DCore::QEntity *mEntityRotationCenter =
nullptr;
Manages the various settings the user can choose from when exporting a 3D scene 3.
void terrainPendingJobsCountChanged()
Emitted when the number of terrain's pending jobs changes.
void fpsCountChanged(float fpsCount)
Emitted when the FPS count changes.
SceneState
Enumeration of possible states of the 3D scene.
@ Ready
The scene is fully loaded/updated.
@ Updating
The scene is still being loaded/updated.
void totalPendingJobsCountChanged()
Emitted when the total number of pending jobs changes.
void fpsCounterEnabledChanged(bool fpsCounterEnabled)
Emitted when the FPS counter is activated or deactivated.
QgsCameraController * cameraController()
Returns camera controller.
void sceneStateChanged()
Emitted when the scene's state has changed.
SceneState sceneState() const
Returns the current state of the scene.
void terrainEntityChanged()
Emitted when the current terrain entity is replaced by a new one.
QgsTerrainEntity * terrainEntity()
Returns terrain entity (may be temporarily nullptr)
Base class for all renderers that may to participate in 3D view.
Base class for all map layer types.
A rectangle specified with double values.
Base class for all skybox types.
Contains the configuration of a skybox entity.
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features