16 #ifndef QGS3DMAPSCENE_H 17 #define QGS3DMAPSCENE_H 21 #include <Qt3DCore/QEntity> 25 class QRenderSettings;
37 class QForwardRenderer;
46 class QgsTerrainEntity;
47 class QgsChunkedEntity;
70 int terrainPendingJobsCount()
const;
91 float worldSpaceError(
float epsilon,
float distance );
95 void terrainEntityChanged();
97 void terrainPendingJobsCountChanged();
99 void sceneStateChanged();
102 void onCameraChanged();
103 void onFrameTriggered(
float dt );
104 void createTerrain();
105 void onLayerRenderer3DChanged();
106 void onLayersChanged();
107 void createTerrainDeferred();
108 void onBackgroundColorChanged();
109 void onLayerEntityPickEvent( Qt3DRender::QPickEvent *event );
111 void updateCameraLens();
112 void onRenderersChanged();
116 void addCameraViewCenterEntity( Qt3DRender::QCamera *camera );
118 void updateSceneState();
120 bool updateCameraNearFarPlanes();
121 void finalizeNewEntity( Qt3DCore::QEntity *newEntity );
127 Qt3DLogic::QFrameAction *mFrameAction =
nullptr;
129 QgsTerrainEntity *mTerrain =
nullptr;
130 QList<QgsChunkedEntity *> mChunkEntities;
132 Qt3DCore::QEntity *mEntityCameraViewCenter =
nullptr;
134 QMap<QgsMapLayer *, Qt3DCore::QEntity *> mLayerEntities;
135 QMap<const QgsAbstract3DRenderer *, Qt3DCore::QEntity *> mRenderersEntities;
136 bool mTerrainUpdateScheduled =
false;
139 QList<Qgs3DMapScenePickHandler *> mPickHandlers;
141 QList<Qt3DCore::QEntity *> mLightEntities;
144 #endif // QGS3DMAPSCENE_H 3 Abstract base class for handlers that process pick events from a 3D map scene.
Base class for all map layer types.
Base class for all renderers that may to participate in 3D view.
SceneState
Enumeration of possible states of the 3D scene.
QgsTerrainEntity * terrainEntity()
Returns terrain entity (may be temporarily nullptr)
3 Definition of the world
SceneState sceneState() const
Returns the current state of the scene.
3 Base class for 3D engine implementation.
3 Object that controls camera movement based on user input
The scene is fully loaded/updated.
3 Entity that encapsulates our 3D scene - contains all other entities (such as terrain) as children...
The scene is still being loaded/updated.
QgsCameraController * cameraController()
Returns camera controller.