QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
3 More...
#include <qgsabstract3dengine.h>
Signals | |
void | depthBufferCaptured (const QImage &image) |
Emitted after a call to requestDepthBufferCapture() to return the captured depth buffer. | |
void | imageCaptured (const QImage &image) |
Emitted after a call to requestCaptureImage() to return the captured image. | |
void | sizeChanged () |
Emitted after a call to setSize() | |
Public Member Functions | |
QgsAbstract3DEngine (QObject *parent=nullptr) | |
Constructor for QgsAbstract3DEngine with the specified parent object. | |
virtual Qt3DRender::QCamera * | camera ()=0 |
Returns pointer to the engine's camera entity. | |
QString | dumpFrameGraph () const |
Dump frame graph as string. | |
void | dumpFrameGraphToConsole () const |
Dump the current frame graph and scene graph to the console. | |
QString | dumpSceneGraph () const |
Dump scene graph as string. | |
QgsFrameGraph * | frameGraph () |
Returns the shadow rendering frame graph object used to render the scene. | |
bool | renderCaptureEnabled () const |
Returns whether it will be possible to render to an image. | |
virtual Qt3DRender::QRenderSettings * | renderSettings ()=0 |
Returns access to the engine's render settings (the frame graph can be accessed from here) | |
void | requestCaptureImage () |
Starts a request for an image rendered by the engine. | |
void | requestDepthBufferCapture () |
Starts a request for an image containing the depth buffer data of the engine. | |
virtual void | setClearColor (const QColor &color)=0 |
Sets background color of the scene. | |
virtual void | setFrustumCullingEnabled (bool enabled)=0 |
Sets whether frustum culling is enabled (this should make rendering faster by not rendering entities outside of camera's view) | |
void | setRenderCaptureEnabled (bool enabled) |
Sets whether it will be possible to render to an image. | |
virtual void | setRootEntity (Qt3DCore::QEntity *root)=0 |
Sets root entity of the 3D scene. | |
virtual void | setSize (QSize s)=0 |
Sets the size of the rendering area (in pixels) | |
virtual QSize | size () const =0 |
Returns size of the engine's rendering area in pixels. | |
virtual QSurface * | surface () const =0 |
Returns the surface of the engine. | |
Protected Attributes | |
QgsFrameGraph * | mFrameGraph = nullptr |
3
Base class for 3D engine implementation. A 3D engine is responsible for setting up rendering with Qt3D. This means mainly:
We have two implementations:
Definition at line 60 of file qgsabstract3dengine.h.
QgsAbstract3DEngine::QgsAbstract3DEngine | ( | QObject * | parent = nullptr | ) |
Constructor for QgsAbstract3DEngine with the specified parent object.
Definition at line 24 of file qgsabstract3dengine.cpp.
|
pure virtual |
Returns pointer to the engine's camera entity.
Implemented in QgsOffscreen3DEngine, and QgsWindow3DEngine.
|
signal |
Emitted after a call to requestDepthBufferCapture() to return the captured depth buffer.
QString QgsAbstract3DEngine::dumpFrameGraph | ( | ) | const |
Dump frame graph as string.
Definition at line 73 of file qgsabstract3dengine.cpp.
void QgsAbstract3DEngine::dumpFrameGraphToConsole | ( | ) | const |
Dump the current frame graph and scene graph to the console.
Definition at line 64 of file qgsabstract3dengine.cpp.
QString QgsAbstract3DEngine::dumpSceneGraph | ( | ) | const |
Dump scene graph as string.
Definition at line 82 of file qgsabstract3dengine.cpp.
|
inline |
Returns the shadow rendering frame graph object used to render the scene.
Definition at line 112 of file qgsabstract3dengine.h.
|
signal |
Emitted after a call to requestCaptureImage() to return the captured image.
bool QgsAbstract3DEngine::renderCaptureEnabled | ( | ) | const |
Returns whether it will be possible to render to an image.
Definition at line 59 of file qgsabstract3dengine.cpp.
|
pure virtual |
Returns access to the engine's render settings (the frame graph can be accessed from here)
Implemented in QgsOffscreen3DEngine, and QgsWindow3DEngine.
void QgsAbstract3DEngine::requestCaptureImage | ( | ) |
Starts a request for an image rendered by the engine.
The function does not block - when the rendered image is captured, it is returned in imageCaptured() signal. Only one image request can be active at a time.
Definition at line 30 of file qgsabstract3dengine.cpp.
void QgsAbstract3DEngine::requestDepthBufferCapture | ( | ) |
Starts a request for an image containing the depth buffer data of the engine.
The function does not block - when the depth buffer image is captured, it is returned in depthBufferCaptured() signal. Only one image request can be active at a time.
Definition at line 42 of file qgsabstract3dengine.cpp.
|
pure virtual |
Sets background color of the scene.
Implemented in QgsOffscreen3DEngine, and QgsWindow3DEngine.
|
pure virtual |
Sets whether frustum culling is enabled (this should make rendering faster by not rendering entities outside of camera's view)
Implemented in QgsOffscreen3DEngine, and QgsWindow3DEngine.
void QgsAbstract3DEngine::setRenderCaptureEnabled | ( | bool | enabled | ) |
Sets whether it will be possible to render to an image.
Definition at line 54 of file qgsabstract3dengine.cpp.
|
pure virtual |
Sets root entity of the 3D scene.
Implemented in QgsOffscreen3DEngine, and QgsWindow3DEngine.
|
pure virtual |
Sets the size of the rendering area (in pixels)
Implemented in QgsOffscreen3DEngine, and QgsWindow3DEngine.
|
pure virtual |
Returns size of the engine's rendering area in pixels.
Implemented in QgsOffscreen3DEngine, and QgsWindow3DEngine.
|
signal |
Emitted after a call to setSize()
|
pure virtual |
Returns the surface of the engine.
Implemented in QgsOffscreen3DEngine, and QgsWindow3DEngine.
|
protected |
Definition at line 157 of file qgsabstract3dengine.h.