QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
qgsabstract3dengine.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsabstract3dengine.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 QGSABSTRACT3DENGINE_H
17
#define QGSABSTRACT3DENGINE_H
18
19
#include "qgis_3d.h"
20
21
#include <QElapsedTimer>
22
#include <QObject>
23
24
#define SIP_NO_FILE
25
26
class
QColor;
27
class
QRect;
28
class
QSurface;
29
30
namespace
Qt3DCore
31
{
32
class
QEntity;
33
}
34
35
namespace
Qt3DRender
36
{
37
class
QRenderSettings;
38
class
QCamera;
39
class
QFrameGraphNode;
40
}
// namespace Qt3DRender
41
42
class
QgsFrameGraph
;
43
60
class
_3D_EXPORT
QgsAbstract3DEngine
:
public
QObject
61
{
62
Q_OBJECT
63
public
:
67
QgsAbstract3DEngine
( QObject *parent =
nullptr
);
68
70
virtual
void
setClearColor
(
const
QColor &color ) = 0;
72
virtual
void
setFrustumCullingEnabled
(
bool
enabled ) = 0;
74
virtual
void
setRootEntity
( Qt3DCore::QEntity *root ) = 0;
75
77
virtual
Qt3DRender::QRenderSettings *
renderSettings
() = 0;
79
virtual
Qt3DRender::QCamera *
camera
() = 0;
81
virtual
QSize
size
()
const
= 0;
83
virtual
void
setSize
( QSize s ) = 0;
84
90
void
requestDepthBufferCapture
();
91
97
void
requestCaptureImage
();
98
104
virtual
QSurface *
surface
()
const
= 0;
105
111
QgsFrameGraph
*
frameGraph
() {
return
mFrameGraph
; }
112
116
void
dumpFrameGraphToConsole()
const
;
117
119
QString dumpFrameGraph()
const
;
120
122
QString dumpSceneGraph()
const
;
123
124
signals:
126
void
imageCaptured
(
const
QImage &image );
127
133
void
depthBufferCaptured
(
const
QImage &image );
134
139
void
sizeChanged
();
140
141
protected
:
142
QgsFrameGraph
*
mFrameGraph
=
nullptr
;
143
};
144
145
146
#endif
// QGSABSTRACT3DENGINE_H
QgsAbstract3DEngine::requestCaptureImage
void requestCaptureImage()
Starts a request for an image rendered by the engine.
Definition
qgsabstract3dengine.cpp:30
QgsAbstract3DEngine::sizeChanged
void sizeChanged()
Emitted after a call to setSize().
QgsAbstract3DEngine::requestDepthBufferCapture
void requestDepthBufferCapture()
Starts a request for an image containing the depth buffer data of the engine.
Definition
qgsabstract3dengine.cpp:43
QgsAbstract3DEngine::imageCaptured
void imageCaptured(const QImage &image)
Emitted after a call to requestCaptureImage() to return the captured image.
QgsAbstract3DEngine::surface
virtual QSurface * surface() const =0
Returns the surface of the engine.
QgsAbstract3DEngine::depthBufferCaptured
void depthBufferCaptured(const QImage &image)
Emitted after a call to requestDepthBufferCapture() to return the captured depth buffer.
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::mFrameGraph
QgsFrameGraph * mFrameGraph
Definition
qgsabstract3dengine.h:142
QgsAbstract3DEngine::setFrustumCullingEnabled
virtual void setFrustumCullingEnabled(bool enabled)=0
Sets whether frustum culling is enabled (this should make rendering faster by not rendering entities ...
QgsAbstract3DEngine::frameGraph
QgsFrameGraph * frameGraph()
Returns the shadow rendering frame graph object used to render the scene.
Definition
qgsabstract3dengine.h:111
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).
QgsFrameGraph
Container class that holds different objects related to frame graphs of 3D scenes.
Definition
qgsframegraph.h:86
Qt3DCore
Definition
qgsabstract3drenderer.h:33
Qt3DRender
Definition
qgs3d.h:45
Generated on
for QGIS API Documentation by
1.17.0