16#ifndef QGS3DMAPCANVAS_H
17#define QGS3DMAPCANVAS_H
24#include <QtGui/QWindow>
30 class QAbstractAspect;
37 class QFrameGraphNode;
39 class QRenderSettings;
44 class QForwardRenderer;
103 void setRootEntity( Qt3DCore::QEntity *root );
108 void setActiveFrameGraph( Qt3DRender::QFrameGraphNode *activeFrameGraph );
113 Qt3DRender::QFrameGraphNode *activeFrameGraph()
const;
118 Qt3DRender::QCamera *camera()
const;
123 Qt3DRender::QRenderSettings *renderSettings()
const;
132 void setViewFromTop(
const QgsPointXY ¢er,
float distance,
float rotation = 0 );
135 void saveAsImage(
const QString &fileName,
const QString &fileFormat );
167 QVector<QgsPointXY> viewFrustum2DExtent();
178 void clearHighlights();
202 void captureDepthBuffer();
205 void updateHighlightSizes();
211 void showEvent( QShowEvent *e )
override;
216 void resizeEvent( QResizeEvent * )
override;
218 bool eventFilter( QObject *watched, QEvent *event )
override;
221 Qt3DCore::QAspectEngine *m_aspectEngine;
224 Qt3DRender::QRenderAspect *m_renderAspect;
225 Qt3DInput::QInputAspect *m_inputAspect;
226 Qt3DLogic::QLogicAspect *m_logicAspect;
229 Qt3DRender::QRenderSettings *m_renderSettings;
230 Qt3DRender::QCamera *m_defaultCamera;
233 Qt3DInput::QInputSettings *m_inputSettings;
236 Qt3DCore::QEntity *m_root;
237 Qt3DCore::QEntity *m_userRoot;
251 QString mCaptureFileName;
252 QString mCaptureFileFormat;
257 QMap<QgsMapLayer *, QgsRubberBand3D *> mHighlights;
NavigationMode
The navigation mode used by 3D cameras.
Convenience wrapper to simplify the creation of a 3D window ready to be used with QGIS.
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.
Entity that encapsulates our 3D scene - contains all other entities (such as terrain) as children.
Object that controls camera movement based on user input.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Base class for all map layer types.
A rectangle specified with double values.
A controller base class for temporal objects, contains a signal for notifying updates of the objects ...
On-screen 3D engine: it creates an OpenGL window (QWindow) and displays rendered 3D scenes there.