QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
Signals | Public Member Functions | List of all members
QgsAbstract3DEngine Class Referenceabstract

3 Base class for 3D engine implementation. More...

#include <qgsabstract3dengine.h>

Inheritance diagram for QgsAbstract3DEngine:
Inheritance graph
[legend]

Signals

void imageCaptured (const QImage &image)
 Emitted after a call to requestCaptureImage() to return the captured image. More...
 

Public Member Functions

 QgsAbstract3DEngine (QObject *parent=nullptr)
 Constructor for QgsAbstract3DEngine with the specified parent object. More...
 
virtual Qt3DRender::QCamera * camera ()=0
 Returns pointer to the engine's camera entity. More...
 
virtual Qt3DRender::QRenderSettings * renderSettings ()=0
 Returns access to the engine's render settings (the frame graph can be accessed from here) More...
 
virtual void requestCaptureImage ()=0
 Starts a request for an image rendered by the engine. More...
 
virtual void setClearColor (const QColor &color)=0
 Sets background color of the scene. More...
 
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) More...
 
virtual void setRootEntity (Qt3DCore::QEntity *root)=0
 Sets root entity of the 3D scene. More...
 
virtual QSize size () const =0
 Returns size of the engine's rendering area in pixels. More...
 
virtual QSurface * surface () const =0
 Returns the surface of the engine. More...
 

Detailed Description

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:

Note
Not available in Python bindings
Since
QGIS 3.4

Definition at line 57 of file qgsabstract3dengine.h.

Constructor & Destructor Documentation

◆ QgsAbstract3DEngine()

QgsAbstract3DEngine::QgsAbstract3DEngine ( QObject *  parent = nullptr)

Constructor for QgsAbstract3DEngine with the specified parent object.

Definition at line 18 of file qgsabstract3dengine.cpp.

Member Function Documentation

◆ camera()

virtual Qt3DRender::QCamera* QgsAbstract3DEngine::camera ( )
pure virtual

Returns pointer to the engine's camera entity.

Implemented in QgsWindow3DEngine, and QgsOffscreen3DEngine.

◆ imageCaptured

void QgsAbstract3DEngine::imageCaptured ( const QImage &  image)
signal

Emitted after a call to requestCaptureImage() to return the captured image.

◆ renderSettings()

virtual Qt3DRender::QRenderSettings* QgsAbstract3DEngine::renderSettings ( )
pure virtual

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

Implemented in QgsWindow3DEngine, and QgsOffscreen3DEngine.

◆ requestCaptureImage()

virtual void QgsAbstract3DEngine::requestCaptureImage ( )
pure virtual

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.

Implemented in QgsWindow3DEngine, and QgsOffscreen3DEngine.

◆ setClearColor()

virtual void QgsAbstract3DEngine::setClearColor ( const QColor &  color)
pure virtual

Sets background color of the scene.

Implemented in QgsWindow3DEngine, and QgsOffscreen3DEngine.

◆ setFrustumCullingEnabled()

virtual void QgsAbstract3DEngine::setFrustumCullingEnabled ( bool  enabled)
pure virtual

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

Implemented in QgsWindow3DEngine, and QgsOffscreen3DEngine.

◆ setRootEntity()

virtual void QgsAbstract3DEngine::setRootEntity ( Qt3DCore::QEntity *  root)
pure virtual

Sets root entity of the 3D scene.

Implemented in QgsWindow3DEngine, and QgsOffscreen3DEngine.

◆ size()

virtual QSize QgsAbstract3DEngine::size ( ) const
pure virtual

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

Implemented in QgsWindow3DEngine, and QgsOffscreen3DEngine.

◆ surface()

virtual QSurface* QgsAbstract3DEngine::surface ( ) const
pure virtual

Returns the surface of the engine.

Since
QGIS 3.14

Implemented in QgsWindow3DEngine, and QgsOffscreen3DEngine.


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