16#ifndef QGS3DMAPCANVAS_H
17#define QGS3DMAPCANVAS_H
24#include <QtGui/QWindow>
30 class QAbstractAspect;
37 class QFrameGraphNode;
39 class QRenderSettings;
44 class QForwardRenderer;
133 void enableCrossSection(
const QgsPointXY &startPoint,
const QgsPointXY &endPoint,
double tolerance,
bool setSideView =
true );
140 void disableCrossSection();
148 bool crossSectionEnabled()
const;
155 void setRootEntity( Qt3DCore::QEntity *root );
160 void setActiveFrameGraph( Qt3DRender::QFrameGraphNode *activeFrameGraph );
165 Qt3DRender::QFrameGraphNode *activeFrameGraph()
const;
170 Qt3DRender::QCamera *camera()
const;
175 Qt3DRender::QRenderSettings *renderSettings()
const;
184 void setViewFromTop(
const QgsPointXY ¢er,
float distance,
float rotation = 0 );
187 void saveAsImage(
const QString &fileName,
const QString &fileFormat );
207 QVector<QgsPointXY> viewFrustum2DExtent();
218 void clearHighlights();
248 void captureDepthBuffer();
251 void updateHighlightSizes();
258 void showEvent( QShowEvent *e )
override;
265 bool eventFilter( QObject *watched, QEvent *event )
override;
268 Qt3DCore::QAspectEngine *m_aspectEngine;
271 Qt3DRender::QRenderAspect *m_renderAspect;
272 Qt3DInput::QInputAspect *m_inputAspect;
273 Qt3DLogic::QLogicAspect *m_logicAspect;
276 Qt3DRender::QRenderSettings *m_renderSettings;
277 Qt3DRender::QCamera *m_defaultCamera;
280 Qt3DInput::QInputSettings *m_inputSettings;
283 Qt3DCore::QEntity *m_root;
284 Qt3DCore::QEntity *m_userRoot;
298 QString mCaptureFileName;
299 QString mCaptureFileFormat;
304 QMap<QgsMapLayer *, QgsRubberBand3D *> mHighlights;
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 crossSectionEnabledChanged(bool enabled)
Emitted when the cross section mode is enabled or disabled.
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 showEvent(QShowEvent *e) override
Manages the display events specified in e.
void cameraNavigationSpeedChanged(double speed)
Emitted when the camera navigation speed is changed.
Qgs3DMapScene * scene()
Returns access to the 3D scene (root 3D entity).
void resizeEvent(QResizeEvent *) override
Resets the aspect ratio of the 3D window.
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.
bool eventFilter(QObject *watched, QEvent *event) override
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.
Responsible for defining parameters of the ray casting operations in 3D map canvases.
Contains the results of ray casting operations in a 3D map canvas.
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.
QgsTemporalRange< QDateTime > QgsDateTimeRange
QgsRange which stores a range of date times.