QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
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
#include <QSize>
22
23
#define SIP_NO_FILE
24
25
namespace
Qt3DExtras
26
{
27
class
QForwardRenderer;
28
}
29
30
class
Qgs3DMapCanvas
;
31
class
QWindow;
32
33
43
class
_3D_EXPORT
QgsWindow3DEngine
:
public
QgsAbstract3DEngine
44
{
45
Q_OBJECT
46
public
:
50
QgsWindow3DEngine
(
Qgs3DMapCanvas
*parent );
51
53
QWindow *
window
();
54
56
Qt3DCore::QEntity *
root
()
const
;
57
58
void
setClearColor
(
const
QColor &color )
override
;
59
void
setFrustumCullingEnabled
(
bool
enabled )
override
;
60
void
setRootEntity
( Qt3DCore::QEntity *
root
)
override
;
61
62
Qt3DRender::QRenderSettings *
renderSettings
()
override
;
63
Qt3DRender::QCamera *
camera
()
override
;
64
QSize
size
()
const override
;
65
QSurface *
surface
()
const override
;
66
67
void
setSize
( QSize s )
override
;
68
69
private
:
71
Qgs3DMapCanvas
*mMapCanvas3D =
nullptr
;
73
Qt3DCore::QEntity *mRoot =
nullptr
;
74
Qt3DCore::QEntity *mSceneRoot =
nullptr
;
75
76
QSize mSize = QSize( 1024, 768 );
77
};
78
79
#endif
// QGSWINDOW3DENGINE_H
Qgs3DMapCanvas
Convenience wrapper to simplify the creation of a 3D window ready to be used with QGIS.
Definition
qgs3dmapcanvas.h:89
QgsAbstract3DEngine::surface
virtual QSurface * surface() const =0
Returns the surface of the engine.
QgsAbstract3DEngine::camera
virtual Qt3DRender::QCamera * camera()=0
Returns pointer to the engine's camera entity.
QgsAbstract3DEngine::QgsAbstract3DEngine
QgsAbstract3DEngine(QObject *parent=nullptr)
Constructor for QgsAbstract3DEngine with the specified parent object.
Definition
qgsabstract3dengine.cpp:26
QgsAbstract3DEngine::setClearColor
virtual void setClearColor(const QColor &color)=0
Sets background color of the scene.
QgsAbstract3DEngine::setSize
virtual void setSize(QSize s)=0
Sets the size of the rendering area (in pixels).
QgsAbstract3DEngine::setFrustumCullingEnabled
virtual void setFrustumCullingEnabled(bool enabled)=0
Sets whether frustum culling is enabled (this should make rendering faster by not rendering entities ...
QgsAbstract3DEngine::setRootEntity
virtual void setRootEntity(Qt3DCore::QEntity *root)=0
Sets root entity of the 3D scene.
QgsAbstract3DEngine::size
virtual QSize size() const =0
Returns size of the engine's rendering area in pixels.
QgsAbstract3DEngine::renderSettings
virtual Qt3DRender::QRenderSettings * renderSettings()=0
Returns access to the engine's render settings (the frame graph can be accessed from here).
QgsWindow3DEngine::QgsWindow3DEngine
QgsWindow3DEngine(Qgs3DMapCanvas *parent)
Constructor for QgsWindow3DEngine with the specified parent Qgs3DMapCanvas.
Definition
qgswindow3dengine.cpp:26
QgsWindow3DEngine::root
Qt3DCore::QEntity * root() const
Returns the root entity.
Definition
qgswindow3dengine.cpp:46
QgsWindow3DEngine::window
QWindow * window()
Returns the internal 3D window where all the rendered output is displayed.
Definition
qgswindow3dengine.cpp:41
Qt3DExtras
Definition
qgs3daxis.h:39
qgsabstract3dengine.h
Generated on
for QGIS API Documentation by
1.17.0