QGIS API Documentation  3.4.15-Madeira (e83d02e274)
qgswindow3dengine.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgswindow3dengine.h
3  --------------------------------------
4  Date : July 2018
5  Copyright : (C) 2018 by Martin Dobias
6  Email : wonder dot sk at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSWINDOW3DENGINE_H
17 #define QGSWINDOW3DENGINE_H
18 
19 #include "qgsabstract3dengine.h"
20 
21 
22 namespace Qt3DRender
23 {
24  class QRenderCapture;
25 }
26 
27 namespace Qt3DExtras
28 {
29  class Qt3DWindow;
30 }
31 
32 class QWindow;
33 
34 
42 class _3D_EXPORT QgsWindow3DEngine : public QgsAbstract3DEngine
43 {
44  Q_OBJECT
45  public:
47 
49  QWindow *window();
50 
51  void requestCaptureImage() override;
52 
53  void setClearColor( const QColor &color ) override;
54  void setFrustumCullingEnabled( bool enabled ) override;
55  void setRootEntity( Qt3DCore::QEntity *root ) override;
56 
57  Qt3DRender::QRenderSettings *renderSettings() override;
58  Qt3DRender::QCamera *camera() override;
59  QSize size() const override;
60 
61  private:
63  Qt3DExtras::Qt3DWindow *mWindow3D = nullptr;
65  Qt3DRender::QRenderCapture *mCapture = nullptr;
66 };
67 
68 
69 #endif // QGSWINDOW3DENGINE_H
3 On-screen 3D engine: it creates OpenGL window (QWindow) and displays rendered 3D scene there...
3 Base class for 3D engine implementation.