QGIS API Documentation 3.43.0-Master (2366440f66a)
Public Member Functions | Static Public Attributes | List of all members
QgsFrameGraph Class Reference

Container class that holds different objects related to frame graphs of 3D scenes. More...

#include <qgsframegraph.h>

Inheritance diagram for QgsFrameGraph:
Inheritance graph
[legend]

Public Member Functions

 QgsFrameGraph (QSurface *surface, QSize s, Qt3DRender::QCamera *mainCamera, Qt3DCore::QEntity *root)
 Constructor.
 
void addClipPlanes (int nrClipPlanes)
 Setups nrClipPlanes clip planes in the forward pass to enable OpenGL clipping.
 
QgsAmbientOcclusionRenderViewambientOcclusionRenderView ()
 Returns ambient occlusion renderview.
 
Qt3DRender::QRenderCapture * depthRenderCapture ()
 Returns the render capture object used to take an image of the depth buffer of the scene.
 
QgsDepthRenderViewdepthRenderView ()
 Returns depth renderview.
 
QString dumpFrameGraph () const
 Dumps frame graph as string.
 
QString dumpSceneGraph () const
 Dumps scene graph as string.
 
QgsForwardRenderViewforwardRenderView ()
 Returns forward renderview.
 
Qt3DRender::QFrameGraphNode * frameGraphRoot ()
 Returns the root of the frame graph object.
 
bool isRenderViewEnabled (const QString &name)
 Returns true if the render view named name is found and enabled.
 
Qt3DRender::QCamera * mainCamera ()
 Returns the main camera.
 
QgsPostprocessingEntitypostprocessingEntity ()
 Returns the postprocessing entity.
 
bool registerRenderView (std::unique_ptr< QgsAbstractRenderView > renderView, const QString &name, Qt3DRender::QFrameGraphNode *topNode=nullptr)
 Registers a new the render view renderView with name name.
 
void removeClipPlanes ()
 Disables OpenGL clipping.
 
Qt3DRender::QRenderCapture * renderCapture ()
 Returns the render capture object used to take an image of the scene.
 
bool renderCaptureEnabled () const
 Returns whether it will be possible to render to an image.
 
QgsAbstractRenderViewrenderView (const QString &name)
 Returns the render view named name, if any.
 
Qt3DCore::QEntity * rubberBandsRootEntity ()
 Returns entity for all rubber bands (to show them always on top)
 
void setClearColor (const QColor &clearColor)
 Sets the clear color of the scene (background color)
 
void setDebugOverlayEnabled (bool enabled)
 Sets whether debug overlay is enabled.
 
void setFrustumCullingEnabled (bool enabled)
 Sets whether frustum culling is enabled.
 
void setRenderCaptureEnabled (bool enabled)
 Sets whether it will be possible to render to an image.
 
void setRenderViewEnabled (const QString &name, bool enable)
 Enables or disables the render view named name according to enable.
 
void setSize (QSize s)
 Sets the size of the buffers used for rendering.
 
void setupEyeDomeLighting (bool enabled, double strength, int distance)
 Sets eye dome lighting shading related settings.
 
QgsShadowRenderViewshadowRenderView ()
 Returns shadow renderview.
 
void unregisterRenderView (const QString &name)
 Unregisters the render view named name, if any.
 
void updateDebugDepthMapSettings (const Qgs3DMapSettings &settings)
 Updates settings for depth debug map.
 
void updateDebugShadowMapSettings (const Qgs3DMapSettings &settings)
 Updates settings for shadows debug map.
 
void updateShadowSettings (const QgsShadowSettings &shadowSettings, const QList< QgsLightSource * > &lightSources)
 Updates shadow bias, light and texture size according to shadowSettings and lightSources.
 

Static Public Attributes

static const QString AMBIENT_OCCLUSION_RENDERVIEW = "ambient_occlusion"
 Ambient occlusion render view name.
 
static const QString AXIS3D_RENDERVIEW = "3daxis"
 
static const QString DEBUG_RENDERVIEW = "debug_texture"
 
static const QString DEPTH_RENDERVIEW = "depth"
 
static const QString FORWARD_RENDERVIEW = "forward"
 
static const QString SHADOW_RENDERVIEW = "shadow"
 

Detailed Description

Container class that holds different objects related to frame graphs of 3D scenes.

A frame graph captures configuration of rendering passes when 3D scene gets rendered.

Note
Not available in Python bindings
Since
QGIS 3.16

Definition at line 66 of file qgsframegraph.h.

Constructor & Destructor Documentation

◆ QgsFrameGraph()

QgsFrameGraph::QgsFrameGraph ( QSurface *  surface,
QSize  s,
Qt3DRender::QCamera *  mainCamera,
Qt3DCore::QEntity *  root 
)

Constructor.

Definition at line 219 of file qgsframegraph.cpp.

Member Function Documentation

◆ addClipPlanes()

void QgsFrameGraph::addClipPlanes ( int  nrClipPlanes)

Setups nrClipPlanes clip planes in the forward pass to enable OpenGL clipping.

If nrClipPlanes is equal to 0, the clipping is disabled.

See also
removeClipPlanes()
Since
QGIS 3.40

Definition at line 491 of file qgsframegraph.cpp.

◆ ambientOcclusionRenderView()

QgsAmbientOcclusionRenderView & QgsFrameGraph::ambientOcclusionRenderView ( )

Returns ambient occlusion renderview.

Since
QGIS 3.44

Definition at line 514 of file qgsframegraph.cpp.

◆ depthRenderCapture()

Qt3DRender::QRenderCapture * QgsFrameGraph::depthRenderCapture ( )

Returns the render capture object used to take an image of the depth buffer of the scene.

Definition at line 214 of file qgsframegraph.cpp.

◆ depthRenderView()

QgsDepthRenderView & QgsFrameGraph::depthRenderView ( )

Returns depth renderview.

Since
QGIS 3.44

Definition at line 508 of file qgsframegraph.cpp.

◆ dumpFrameGraph()

QString QgsFrameGraph::dumpFrameGraph ( ) const

Dumps frame graph as string.

Definition at line 423 of file qgsframegraph.cpp.

◆ dumpSceneGraph()

QString QgsFrameGraph::dumpSceneGraph ( ) const

Dumps scene graph as string.

Definition at line 436 of file qgsframegraph.cpp.

◆ forwardRenderView()

QgsForwardRenderView & QgsFrameGraph::forwardRenderView ( )

Returns forward renderview.

Since
QGIS 3.44

Definition at line 496 of file qgsframegraph.cpp.

◆ frameGraphRoot()

Qt3DRender::QFrameGraphNode * QgsFrameGraph::frameGraphRoot ( )
inline

Returns the root of the frame graph object.

Definition at line 75 of file qgsframegraph.h.

◆ isRenderViewEnabled()

bool QgsFrameGraph::isRenderViewEnabled ( const QString &  name)

Returns true if the render view named name is found and enabled.

Since
QGIS 3.44

Definition at line 338 of file qgsframegraph.cpp.

◆ mainCamera()

Qt3DRender::QCamera * QgsFrameGraph::mainCamera ( )
inline

Returns the main camera.

Definition at line 78 of file qgsframegraph.h.

◆ postprocessingEntity()

QgsPostprocessingEntity * QgsFrameGraph::postprocessingEntity ( )
inline

Returns the postprocessing entity.

Definition at line 81 of file qgsframegraph.h.

◆ registerRenderView()

bool QgsFrameGraph::registerRenderView ( std::unique_ptr< QgsAbstractRenderView renderView,
const QString &  name,
Qt3DRender::QFrameGraphNode *  topNode = nullptr 
)

Registers a new the render view renderView with name name.

topNode is where the new renderview will be attached to. If nullptr then it will be attached to the main viewport. Will take ownership of the renderView.

Since
QGIS 3.44

Definition at line 305 of file qgsframegraph.cpp.

◆ removeClipPlanes()

void QgsFrameGraph::removeClipPlanes ( )

Disables OpenGL clipping.

See also
addClipPlanes()
Since
QGIS 3.40

Definition at line 486 of file qgsframegraph.cpp.

◆ renderCapture()

Qt3DRender::QRenderCapture * QgsFrameGraph::renderCapture ( )
inline

Returns the render capture object used to take an image of the scene.

Definition at line 87 of file qgsframegraph.h.

◆ renderCaptureEnabled()

bool QgsFrameGraph::renderCaptureEnabled ( ) const
inline

Returns whether it will be possible to render to an image.

Since
QGIS 3.18

Definition at line 113 of file qgsframegraph.h.

◆ renderView()

QgsAbstractRenderView * QgsFrameGraph::renderView ( const QString &  name)

Returns the render view named name, if any.

Since
QGIS 3.44

Definition at line 329 of file qgsframegraph.cpp.

◆ rubberBandsRootEntity()

Qt3DCore::QEntity * QgsFrameGraph::rubberBandsRootEntity ( )
inline

Returns entity for all rubber bands (to show them always on top)

Definition at line 84 of file qgsframegraph.h.

◆ setClearColor()

void QgsFrameGraph::setClearColor ( const QColor &  clearColor)

Sets the clear color of the scene (background color)

Definition at line 442 of file qgsframegraph.cpp.

◆ setDebugOverlayEnabled()

void QgsFrameGraph::setDebugOverlayEnabled ( bool  enabled)

Sets whether debug overlay is enabled.

Since
QGIS 3.26

Definition at line 481 of file qgsframegraph.cpp.

◆ setFrustumCullingEnabled()

void QgsFrameGraph::setFrustumCullingEnabled ( bool  enabled)

Sets whether frustum culling is enabled.

Definition at line 447 of file qgsframegraph.cpp.

◆ setRenderCaptureEnabled()

void QgsFrameGraph::setRenderCaptureEnabled ( bool  enabled)

Sets whether it will be possible to render to an image.

Since
QGIS 3.18

Definition at line 473 of file qgsframegraph.cpp.

◆ setRenderViewEnabled()

void QgsFrameGraph::setRenderViewEnabled ( const QString &  name,
bool  enable 
)

Enables or disables the render view named name according to enable.

Since
QGIS 3.44

Definition at line 321 of file qgsframegraph.cpp.

◆ setSize()

void QgsFrameGraph::setSize ( QSize  s)

Sets the size of the buffers used for rendering.

Definition at line 459 of file qgsframegraph.cpp.

◆ setupEyeDomeLighting()

void QgsFrameGraph::setupEyeDomeLighting ( bool  enabled,
double  strength,
int  distance 
)

Sets eye dome lighting shading related settings.

Definition at line 452 of file qgsframegraph.cpp.

◆ shadowRenderView()

QgsShadowRenderView & QgsFrameGraph::shadowRenderView ( )

Returns shadow renderview.

Since
QGIS 3.44

Definition at line 502 of file qgsframegraph.cpp.

◆ unregisterRenderView()

void QgsFrameGraph::unregisterRenderView ( const QString &  name)

Unregisters the render view named name, if any.

Since
QGIS 3.44

Definition at line 296 of file qgsframegraph.cpp.

◆ updateDebugDepthMapSettings()

void QgsFrameGraph::updateDebugDepthMapSettings ( const Qgs3DMapSettings settings)

Updates settings for depth debug map.

Since
QGIS 3.44

Definition at line 399 of file qgsframegraph.cpp.

◆ updateDebugShadowMapSettings()

void QgsFrameGraph::updateDebugShadowMapSettings ( const Qgs3DMapSettings settings)

Updates settings for shadows debug map.

Since
QGIS 3.44

Definition at line 375 of file qgsframegraph.cpp.

◆ updateShadowSettings()

void QgsFrameGraph::updateShadowSettings ( const QgsShadowSettings shadowSettings,
const QList< QgsLightSource * > &  lightSources 
)

Updates shadow bias, light and texture size according to shadowSettings and lightSources.

Since
QGIS 3.44

Definition at line 343 of file qgsframegraph.cpp.

Member Data Documentation

◆ AMBIENT_OCCLUSION_RENDERVIEW

const QString QgsFrameGraph::AMBIENT_OCCLUSION_RENDERVIEW = "ambient_occlusion"
static

Ambient occlusion render view name.

Definition at line 225 of file qgsframegraph.h.

◆ AXIS3D_RENDERVIEW

const QString QgsFrameGraph::AXIS3D_RENDERVIEW = "3daxis"
static

Definition at line 221 of file qgsframegraph.h.

◆ DEBUG_RENDERVIEW

const QString QgsFrameGraph::DEBUG_RENDERVIEW = "debug_texture"
static

Definition at line 223 of file qgsframegraph.h.

◆ DEPTH_RENDERVIEW

const QString QgsFrameGraph::DEPTH_RENDERVIEW = "depth"
static

Definition at line 222 of file qgsframegraph.h.

◆ FORWARD_RENDERVIEW

const QString QgsFrameGraph::FORWARD_RENDERVIEW = "forward"
static

Definition at line 219 of file qgsframegraph.h.

◆ SHADOW_RENDERVIEW

const QString QgsFrameGraph::SHADOW_RENDERVIEW = "shadow"
static

Definition at line 220 of file qgsframegraph.h.


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