QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsOffscreen3DEngine Class Reference

3 More...

#include <qgsoffscreen3dengine.h>

Inheritance diagram for QgsOffscreen3DEngine:
Inheritance graph
[legend]

Public Member Functions

 QgsOffscreen3DEngine ()
 
 ~QgsOffscreen3DEngine () override
 
Qt3DRender::QCamera * camera () override
 Returns pointer to the engine's camera entity.
 
Qt3DRender::QRenderSettings * renderSettings () override
 Returns access to the engine's render settings (the frame graph can be accessed from here)
 
void setClearColor (const QColor &color) override
 Sets background color of the scene.
 
void setFrustumCullingEnabled (bool enabled) override
 Sets whether frustum culling is enabled (this should make rendering faster by not rendering entities outside of camera's view)
 
void setRootEntity (Qt3DCore::QEntity *root) override
 Sets root entity of the 3D scene.
 
void setSize (QSize s) override
 Sets the size of the rendering area (in pixels)
 
QSize size () const override
 Returns size of the engine's rendering area in pixels.
 
QSurface * surface () const override
 Returns the surface of the engine.
 
- Public Member Functions inherited from QgsAbstract3DEngine
 QgsAbstract3DEngine (QObject *parent=nullptr)
 Constructor for QgsAbstract3DEngine with the specified parent object.
 
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.
 
QgsFrameGraphframeGraph ()
 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.
 
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.
 
void setRenderCaptureEnabled (bool enabled)
 Sets whether it will be possible to render to an image.
 

Additional Inherited Members

- Signals inherited from QgsAbstract3DEngine
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()
 
- Protected Attributes inherited from QgsAbstract3DEngine
QgsFrameGraphmFrameGraph = nullptr
 

Detailed Description

3

Off-screen 3D engine implementation. It is useful for recording rendered 3D scenes of arbitrary size.

Note
While the on-screen 3D engine also allows capturing of images, its limitation is that the captured images are of the size of the on-screen window.
Not available in Python bindings
Since
QGIS 3.4

Definition at line 63 of file qgsoffscreen3dengine.h.

Constructor & Destructor Documentation

◆ QgsOffscreen3DEngine()

QgsOffscreen3DEngine::QgsOffscreen3DEngine ( )

Definition at line 40 of file qgsoffscreen3dengine.cpp.

◆ ~QgsOffscreen3DEngine()

QgsOffscreen3DEngine::~QgsOffscreen3DEngine ( )
override

Definition at line 116 of file qgsoffscreen3dengine.cpp.

Member Function Documentation

◆ camera()

Qt3DRender::QCamera * QgsOffscreen3DEngine::camera ( )
overridevirtual

Returns pointer to the engine's camera entity.

Implements QgsAbstract3DEngine.

Definition at line 161 of file qgsoffscreen3dengine.cpp.

◆ renderSettings()

Qt3DRender::QRenderSettings * QgsOffscreen3DEngine::renderSettings ( )
overridevirtual

Returns access to the engine's render settings (the frame graph can be accessed from here)

Implements QgsAbstract3DEngine.

Definition at line 156 of file qgsoffscreen3dengine.cpp.

◆ setClearColor()

void QgsOffscreen3DEngine::setClearColor ( const QColor &  color)
overridevirtual

Sets background color of the scene.

Implements QgsAbstract3DEngine.

Definition at line 131 of file qgsoffscreen3dengine.cpp.

◆ setFrustumCullingEnabled()

void QgsOffscreen3DEngine::setFrustumCullingEnabled ( bool  enabled)
overridevirtual

Sets whether frustum culling is enabled (this should make rendering faster by not rendering entities outside of camera's view)

Implements QgsAbstract3DEngine.

Definition at line 136 of file qgsoffscreen3dengine.cpp.

◆ setRootEntity()

void QgsOffscreen3DEngine::setRootEntity ( Qt3DCore::QEntity *  root)
overridevirtual

Sets root entity of the 3D scene.

Implements QgsAbstract3DEngine.

Definition at line 141 of file qgsoffscreen3dengine.cpp.

◆ setSize()

void QgsOffscreen3DEngine::setSize ( QSize  s)
overridevirtual

Sets the size of the rendering area (in pixels)

Implements QgsAbstract3DEngine.

Definition at line 122 of file qgsoffscreen3dengine.cpp.

◆ size()

QSize QgsOffscreen3DEngine::size ( ) const
overridevirtual

Returns size of the engine's rendering area in pixels.

Implements QgsAbstract3DEngine.

Definition at line 166 of file qgsoffscreen3dengine.cpp.

◆ surface()

QSurface * QgsOffscreen3DEngine::surface ( ) const
overridevirtual

Returns the surface of the engine.

Since
QGIS 3.14

Implements QgsAbstract3DEngine.

Definition at line 171 of file qgsoffscreen3dengine.cpp.


The documentation for this class was generated from the following files: