QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Public Member Functions | List of all members
QgsWindow3DEngine Class Reference

3 More...

#include <qgswindow3dengine.h>

Inheritance diagram for QgsWindow3DEngine:
Inheritance graph
[legend]

Public Member Functions

 QgsWindow3DEngine (Qgs3DMapCanvas *parent)
 Constructor for QgsWindow3DEngine with the specified parent Qgs3DMapCanvas. More...
 
Qt3DRender::QCamera * camera () override
 Returns pointer to the engine's camera entity. More...
 
Qt3DRender::QRenderSettings * renderSettings () override
 Returns access to the engine's render settings (the frame graph can be accessed from here) More...
 
Qt3DCore::QEntity * root () const
 Returns the root entity. More...
 
void setClearColor (const QColor &color) override
 Sets background color of the scene. More...
 
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) More...
 
void setRootEntity (Qt3DCore::QEntity *root) override
 Sets root entity of the 3D scene. More...
 
void setShadowRenderingEnabled (bool enabled)
 Sets whether shadow rendering is enabled. More...
 
void setSize (QSize s) override
 Sets the size of the rendering area (in pixels) More...
 
bool shadowRenderingEnabled ()
 Returns whether shadow rendering is enabled. More...
 
QSize size () const override
 Returns size of the engine's rendering area in pixels. More...
 
QSurface * surface () const override
 Returns the surface of the engine. More...
 
QWindow * window ()
 Returns the internal 3D window where all the rendered output is displayed. More...
 
- Public Member Functions inherited from QgsAbstract3DEngine
 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...
 
QgsFrameGraphframeGraph ()
 Returns the shadow rendering frame graph object used to render the scene. More...
 
bool renderCaptureEnabled () const
 Returns whether it will be possible to render to an image. More...
 
virtual Qt3DRender::QRenderSettings * renderSettings ()=0
 Returns access to the engine's render settings (the frame graph can be accessed from here) More...
 
void requestCaptureImage ()
 Starts a request for an image rendered by the engine. More...
 
void requestDepthBufferCapture ()
 Starts a request for an image containing the depth buffer data of 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...
 
void setRenderCaptureEnabled (bool enabled)
 Sets whether it will be possible to render to an image. More...
 
virtual void setRootEntity (Qt3DCore::QEntity *root)=0
 Sets root entity of the 3D scene. More...
 
virtual void setSize (QSize s)=0
 Sets the size of the rendering area (in pixels) 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...
 

Additional Inherited Members

- Signals inherited from QgsAbstract3DEngine
void depthBufferCaptured (const QImage &image)
 Emitted after a call to requestDepthBufferCapture() to return the captured depth buffer. More...
 
void imageCaptured (const QImage &image)
 Emitted after a call to requestCaptureImage() to return the captured image. More...
 
void sizeChanged ()
 Emitted after a call to setSize() More...
 
- Protected Attributes inherited from QgsAbstract3DEngine
QgsFrameGraphmFrameGraph = nullptr
 

Detailed Description

3

On-screen 3D engine: it creates OpenGL window (QWindow) and displays rendered 3D scene there. The window can be embedded into a QWidget-based application with QWidget::createWindowContainer().

Note
Not available in Python bindings
Since
QGIS 3.4

Definition at line 50 of file qgswindow3dengine.h.

Constructor & Destructor Documentation

◆ QgsWindow3DEngine()

QgsWindow3DEngine::QgsWindow3DEngine ( Qgs3DMapCanvas parent)

Constructor for QgsWindow3DEngine with the specified parent Qgs3DMapCanvas.

Definition at line 26 of file qgswindow3dengine.cpp.

Member Function Documentation

◆ camera()

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

Returns pointer to the engine's camera entity.

Implements QgsAbstract3DEngine.

Definition at line 82 of file qgswindow3dengine.cpp.

◆ renderSettings()

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

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

Implements QgsAbstract3DEngine.

Definition at line 77 of file qgswindow3dengine.cpp.

◆ root()

Qt3DCore::QEntity * QgsWindow3DEngine::root ( ) const

Returns the root entity.

Definition at line 47 of file qgswindow3dengine.cpp.

◆ setClearColor()

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

Sets background color of the scene.

Implements QgsAbstract3DEngine.

Definition at line 58 of file qgswindow3dengine.cpp.

◆ setFrustumCullingEnabled()

void QgsWindow3DEngine::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 63 of file qgswindow3dengine.cpp.

◆ setRootEntity()

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

Sets root entity of the 3D scene.

Implements QgsAbstract3DEngine.

Definition at line 69 of file qgswindow3dengine.cpp.

◆ setShadowRenderingEnabled()

void QgsWindow3DEngine::setShadowRenderingEnabled ( bool  enabled)

Sets whether shadow rendering is enabled.

Definition at line 52 of file qgswindow3dengine.cpp.

◆ setSize()

void QgsWindow3DEngine::setSize ( QSize  s)
overridevirtual

Sets the size of the rendering area (in pixels)

Implements QgsAbstract3DEngine.

Definition at line 97 of file qgswindow3dengine.cpp.

◆ shadowRenderingEnabled()

bool QgsWindow3DEngine::shadowRenderingEnabled ( )
inline

Returns whether shadow rendering is enabled.

Definition at line 69 of file qgswindow3dengine.h.

◆ size()

QSize QgsWindow3DEngine::size ( ) const
overridevirtual

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

Implements QgsAbstract3DEngine.

Definition at line 87 of file qgswindow3dengine.cpp.

◆ surface()

QSurface * QgsWindow3DEngine::surface ( ) const
overridevirtual

Returns the surface of the engine.

Since
QGIS 3.14

Implements QgsAbstract3DEngine.

Definition at line 92 of file qgswindow3dengine.cpp.

◆ window()

QWindow * QgsWindow3DEngine::window ( )

Returns the internal 3D window where all the rendered output is displayed.

Definition at line 42 of file qgswindow3dengine.cpp.


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