16#ifndef QGS3DMAPSCENE_H
17#define QGS3DMAPSCENE_H
21#include <Qt3DCore/QEntity>
30 class QRenderSettings;
43 class QForwardRenderer;
53class QgsTerrainEntity;
54class QgsChunkedEntity;
97 QVector<QgsPointXY> viewFrustum2DExtent();
100 int terrainPendingJobsCount()
const;
106 int totalPendingJobsCount()
const;
127 float worldSpaceError(
float epsilon,
float distance );
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 onAmbientOcclusionSettingsChanged();
205 void onEyeDomeShadingSettingsChanged();
206 void onDebugShadowMapSettingsChanged();
207 void onDebugDepthMapSettingsChanged();
208 void onCameraMovementSpeedChanged();
209 void onCameraNavigationModeChanged();
210 void onDebugOverlayEnabledChanged();
212 void on3DAxisSettingsChanged();
214 bool updateCameraNearFarPlanes();
219 void addCameraViewCenterEntity( Qt3DRender::QCamera *camera );
222 void updateSceneState();
224 void finalizeNewEntity( Qt3DCore::QEntity *newEntity );
225 int maximumTextureSize()
const;
231 Qt3DLogic::QFrameAction *mFrameAction =
nullptr;
233 QgsTerrainEntity *mTerrain =
nullptr;
234 QList<QgsChunkedEntity *> mChunkEntities;
236 Qt3DCore::QEntity *mEntityCameraViewCenter =
nullptr;
238 QMap<QgsMapLayer *, Qt3DCore::QEntity *> mLayerEntities;
239 QMap<const QgsAbstract3DRenderer *, Qt3DCore::QEntity *> mRenderersEntities;
240 bool mTerrainUpdateScheduled =
false;
243 QList<Qgs3DMapScenePickHandler *> mPickHandlers;
245 QList<Qt3DCore::QEntity *> mLightEntities;
246 QList<QgsMapLayer *> mModelVectorLayers;
249 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 viewed2DExtentFrom3DChanged(QVector< QgsPointXY > extent)
Emitted when the viewed 2D extent seen by the 3D camera has changed.
QgsAbstract3DEngine * engine()
Returns the abstract 3D engine.
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.
QgsTerrainEntity * terrainEntity()
Returns terrain entity (may be temporarily nullptr)
void totalPendingJobsCountChanged()
Emitted when the total number of pending jobs changes.
void fpsCounterEnabledChanged(bool fpsCounterEnabled)
Emitted when the FPS counter is activated or deactivated.
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.
Qgs3DAxis * get3DAxis()
Returns the 3D axis object.
QgsCameraController * cameraController()
Returns camera controller.
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