16#ifndef QGS3DMAPCANVAS_H
17#define QGS3DMAPCANVAS_H
24#include <QtGui/QWindow>
30 class QAbstractAspect;
37 class QFrameGraphNode;
39 class QRenderSettings;
44 class QForwardRenderer;
108 void setRootEntity( Qt3DCore::QEntity *root );
113 void setActiveFrameGraph( Qt3DRender::QFrameGraphNode *activeFrameGraph );
118 Qt3DRender::QFrameGraphNode *activeFrameGraph()
const;
123 Qt3DRender::QCamera *camera()
const;
128 Qt3DRender::QRenderSettings *renderSettings()
const;
137 void setViewFromTop(
const QgsPointXY ¢er,
float distance,
float rotation = 0 );
140 void saveAsImage(
const QString &fileName,
const QString &fileFormat );
172 QVector<QgsPointXY> viewFrustum2DExtent();
196 void captureDepthBuffer();
205 void showEvent( QShowEvent *e )
override;
210 void resizeEvent( QResizeEvent * )
override;
212 bool eventFilter( QObject *watched, QEvent *event )
override;
216 Qt3DCore::QAspectEngine *m_aspectEngine;
219 Qt3DRender::QRenderAspect *m_renderAspect;
220 Qt3DInput::QInputAspect *m_inputAspect;
221 Qt3DLogic::QLogicAspect *m_logicAspect;
224 Qt3DRender::QRenderSettings *m_renderSettings;
225 Qt3DRender::QCamera *m_defaultCamera;
228 Qt3DInput::QInputSettings *m_inputSettings;
231 Qt3DCore::QEntity *m_root;
232 Qt3DCore::QEntity *m_userRoot;
246 QString mCaptureFileName;
247 QString mCaptureFileFormat;
NavigationMode
The navigation mode used by 3D cameras.
QgsWindow3DEngine * engine() const
Returns the 3D engine.
Qgs3DMapSettings * mapSettings()
Returns access to the 3D scene configuration.
void mapSettingsChanged()
Emitted when the the map setting is changed.
void viewed2DExtentFrom3DChanged(QVector< QgsPointXY > extent)
Emitted when the viewed 2D extent seen by the 3D camera has changed.
Qgs3DMapTool * mapTool() const
Returns the active map tool that will receive events from the 3D canvas.
void fpsCountChanged(float fpsCount)
Emitted when the FPS count changes (at most every frame)
void cameraNavigationSpeedChanged(double speed)
Emitted when the camera navigation speed is changed.
Qgs3DMapScene * scene()
Returns access to the 3D scene (root 3D entity)
void savedAsImage(const QString &fileName)
Emitted when the 3D map canvas was successfully saved as image.
void fpsCounterEnabledChanged(bool enabled)
Emitted when the FPS counter is enabled or disabeld.
A class to represent a 2D point.
A rectangle specified with double values.
A controller base class for temporal objects, contains a signal for notifying updates of the objects ...