QGIS API Documentation 4.3.0-Master (bed6b413c04)
Loading...
Searching...
No Matches
QgsFrameGraph Class Reference

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

#include <qgsframegraph.h>

Inheritance diagram for QgsFrameGraph:

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.
void addGlobalParameters (const QList< Qt3DRender::QParameter * > &parameters)
 Adds additional global parameters to the graph.
QgsAmbientOcclusionRenderViewambientOcclusionRenderView ()
 Returns ambient occlusion renderview.
QgsBloomRenderViewbloomRenderView ()
 Returns the bloom render view.
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.
QgsHighlightsRenderViewhighlightsRenderView ()
 Returns the highlights renderview, used for rendering highlight overlays of identified features.
bool isRenderViewEnabled (const QString &name)
 Returns true if the render view named name is found and enabled.
Qt3DRender::QCamera * mainCamera ()
 Returns the main camera.
bool msaaEnabled () const
 Returns whether multisample anti-aliasing (MSAA) is enabled.
QgsOverlayTextureRenderViewoverlayTextureRenderView ()
 Returns overlay texture renderview.
QgsPostprocessingRenderViewpostprocessingRenderView ()
 Returns post processing renderview.
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.
QgsAbstractRenderViewrenderView (const QString &name)
 Returns the render view named name, if any.
QgsRubberBandRenderViewrubberBandRenderView ()
 Returns rubber band renderview.
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 setMsaaEnabled (bool enabled)
 Sets whether multisample anti-aliasing (MSAA) 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.
QgsShadowRenderViewshadowRenderView ()
 Returns shadow renderview.
void unregisterRenderView (const QString &name)
 Unregisters the render view named name, if any.
void updateAmbientOcclusionSettings (const QgsAmbientOcclusionSettings &settings)
 Updates settings for ambient occlusion.
void updateBloomSettings (const QgsBloomSettings &settings)
 Updates settings for the bloom lighting effect.
void updateColorGradingSettings (const QgsColorGradingSettings &settings)
 Updates settings for color grading.
void updateDebugDepthMapSettings (const Qgs3DMapSettings &settings)
 Updates settings for depth debug map.
void updateEyeDomeSettings (const Qgs3DMapSettings &settings)
 Updates settings for eye dome lighting.
void updateShadowSettings (const Qgs3DMapSettings &mapSettings)
 Updates shadow bias, light and texture size according to shadowSettings and lightSources.

Static Public Attributes

static const QString sAmbientOcclusionRenderView = "ambient_occlusion"
 Ambient occlusion render view name.
static const QString sAxiS3DRenderView = "3daxis"
static const QString sBloomRenderView = "bloom"
static const QString sDepthRenderView = "depth"
static const QString sForwardRenderView = "forward"
static const QString sHighlightsRenderView = "highlights"
static const QString sOverlayRenderView = "overlay_texture"
static const QString sPostprocRenderView = "post_processing"
 Postprocessing render view name.
static const QString sRubberRenderView = "rubber_band"
static const QString sShadowRenderView = "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 85 of file qgsframegraph.h.

Constructor & Destructor Documentation

◆ QgsFrameGraph()

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

Constructor.

Definition at line 213 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 607 of file qgsframegraph.cpp.

◆ addGlobalParameters()

void QgsFrameGraph::addGlobalParameters ( const QList< Qt3DRender::QParameter * > & parameters)

Adds additional global parameters to the graph.

Definition at line 205 of file qgsframegraph.cpp.

◆ ambientOcclusionRenderView()

QgsAmbientOcclusionRenderView & QgsFrameGraph::ambientOcclusionRenderView ( )

Returns ambient occlusion renderview.

Since
QGIS 3.44

Definition at line 630 of file qgsframegraph.cpp.

◆ bloomRenderView()

QgsBloomRenderView & QgsFrameGraph::bloomRenderView ( )

Returns the bloom render view.

Since
QGIS 4.2

Definition at line 636 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 200 of file qgsframegraph.cpp.

◆ depthRenderView()

QgsDepthRenderView & QgsFrameGraph::depthRenderView ( )

Returns depth renderview.

Since
QGIS 3.44

Definition at line 624 of file qgsframegraph.cpp.

◆ dumpFrameGraph()

QString QgsFrameGraph::dumpFrameGraph ( ) const

Dumps frame graph as string.

Definition at line 493 of file qgsframegraph.cpp.

◆ dumpSceneGraph()

QString QgsFrameGraph::dumpSceneGraph ( ) const

Dumps scene graph as string.

Definition at line 506 of file qgsframegraph.cpp.

◆ forwardRenderView()

QgsForwardRenderView & QgsFrameGraph::forwardRenderView ( )

Returns forward renderview.

Since
QGIS 3.44

Definition at line 612 of file qgsframegraph.cpp.

◆ frameGraphRoot()

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

Returns the root of the frame graph object.

Definition at line 94 of file qgsframegraph.h.

◆ highlightsRenderView()

QgsHighlightsRenderView & QgsFrameGraph::highlightsRenderView ( )

Returns the highlights renderview, used for rendering highlight overlays of identified features.

Since
QGIS 4.0

Definition at line 648 of file qgsframegraph.cpp.

◆ 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 359 of file qgsframegraph.cpp.

◆ mainCamera()

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

Returns the main camera.

Definition at line 97 of file qgsframegraph.h.

◆ msaaEnabled()

bool QgsFrameGraph::msaaEnabled ( ) const
inline

Returns whether multisample anti-aliasing (MSAA) is enabled.

Since
QGIS 4.2

Definition at line 139 of file qgsframegraph.h.

◆ overlayTextureRenderView()

QgsOverlayTextureRenderView & QgsFrameGraph::overlayTextureRenderView ( )

Returns overlay texture renderview.

Since
QGIS 4.0

Definition at line 654 of file qgsframegraph.cpp.

◆ postprocessingRenderView()

QgsPostprocessingRenderView & QgsFrameGraph::postprocessingRenderView ( )

Returns post processing renderview.

Since
QGIS 4.2

Definition at line 642 of file qgsframegraph.cpp.

◆ 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 326 of file qgsframegraph.cpp.

◆ removeClipPlanes()

void QgsFrameGraph::removeClipPlanes ( )

Disables OpenGL clipping.

See also
addClipPlanes()
Since
QGIS 3.40

Definition at line 602 of file qgsframegraph.cpp.

◆ renderCapture()

Qt3DRender::QRenderCapture * QgsFrameGraph::renderCapture ( )

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

Definition at line 542 of file qgsframegraph.cpp.

◆ renderView()

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

Returns the render view named name, if any.

Since
QGIS 3.44

Definition at line 350 of file qgsframegraph.cpp.

◆ rubberBandRenderView()

QgsRubberBandRenderView & QgsFrameGraph::rubberBandRenderView ( )

Returns rubber band renderview.

Since
QGIS 4.4

Definition at line 659 of file qgsframegraph.cpp.

◆ setClearColor()

void QgsFrameGraph::setClearColor ( const QColor & clearColor)

Sets the clear color of the scene (background color).

Definition at line 512 of file qgsframegraph.cpp.

◆ setDebugOverlayEnabled()

void QgsFrameGraph::setDebugOverlayEnabled ( bool enabled)

Sets whether debug overlay is enabled.

Since
QGIS 3.26

Definition at line 552 of file qgsframegraph.cpp.

◆ setFrustumCullingEnabled()

void QgsFrameGraph::setFrustumCullingEnabled ( bool enabled)

Sets whether frustum culling is enabled.

Definition at line 517 of file qgsframegraph.cpp.

◆ setMsaaEnabled()

void QgsFrameGraph::setMsaaEnabled ( bool enabled)

Sets whether multisample anti-aliasing (MSAA) is enabled.

Since
QGIS 4.2

Definition at line 557 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 547 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 342 of file qgsframegraph.cpp.

◆ setSize()

void QgsFrameGraph::setSize ( QSize s)

Sets the size of the buffers used for rendering.

Definition at line 522 of file qgsframegraph.cpp.

◆ shadowRenderView()

QgsShadowRenderView & QgsFrameGraph::shadowRenderView ( )

Returns shadow renderview.

Since
QGIS 3.44

Definition at line 618 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 317 of file qgsframegraph.cpp.

◆ updateAmbientOcclusionSettings()

void QgsFrameGraph::updateAmbientOcclusionSettings ( const QgsAmbientOcclusionSettings & settings)

Updates settings for ambient occlusion.

Since
QGIS 3.44

Definition at line 364 of file qgsframegraph.cpp.

◆ updateBloomSettings()

void QgsFrameGraph::updateBloomSettings ( const QgsBloomSettings & settings)

Updates settings for the bloom lighting effect.

Since
QGIS 4.2

Definition at line 382 of file qgsframegraph.cpp.

◆ updateColorGradingSettings()

void QgsFrameGraph::updateColorGradingSettings ( const QgsColorGradingSettings & settings)

Updates settings for color grading.

Since
QGIS 4.2

Definition at line 393 of file qgsframegraph.cpp.

◆ updateDebugDepthMapSettings()

void QgsFrameGraph::updateDebugDepthMapSettings ( const Qgs3DMapSettings & settings)

Updates settings for depth debug map.

Since
QGIS 3.44

Definition at line 468 of file qgsframegraph.cpp.

◆ updateEyeDomeSettings()

void QgsFrameGraph::updateEyeDomeSettings ( const Qgs3DMapSettings & settings)

Updates settings for eye dome lighting.

Since
QGIS 3.44

Definition at line 376 of file qgsframegraph.cpp.

◆ updateShadowSettings()

void QgsFrameGraph::updateShadowSettings ( const Qgs3DMapSettings & mapSettings)

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

Since
QGIS 3.44

Definition at line 398 of file qgsframegraph.cpp.

Member Data Documentation

◆ sAmbientOcclusionRenderView

const QString QgsFrameGraph::sAmbientOcclusionRenderView = "ambient_occlusion"
static

Ambient occlusion render view name.

Definition at line 294 of file qgsframegraph.h.

◆ sAxiS3DRenderView

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

Definition at line 290 of file qgsframegraph.h.

◆ sBloomRenderView

const QString QgsFrameGraph::sBloomRenderView = "bloom"
static

Definition at line 295 of file qgsframegraph.h.

◆ sDepthRenderView

const QString QgsFrameGraph::sDepthRenderView = "depth"
static

Definition at line 291 of file qgsframegraph.h.

◆ sForwardRenderView

const QString QgsFrameGraph::sForwardRenderView = "forward"
static

Definition at line 288 of file qgsframegraph.h.

◆ sHighlightsRenderView

const QString QgsFrameGraph::sHighlightsRenderView = "highlights"
static

Definition at line 298 of file qgsframegraph.h.

◆ sOverlayRenderView

const QString QgsFrameGraph::sOverlayRenderView = "overlay_texture"
static

Definition at line 292 of file qgsframegraph.h.

◆ sPostprocRenderView

const QString QgsFrameGraph::sPostprocRenderView = "post_processing"
static

Postprocessing render view name.

Definition at line 297 of file qgsframegraph.h.

◆ sRubberRenderView

const QString QgsFrameGraph::sRubberRenderView = "rubber_band"
static

Definition at line 299 of file qgsframegraph.h.

◆ sShadowRenderView

const QString QgsFrameGraph::sShadowRenderView = "shadow"
static

Definition at line 289 of file qgsframegraph.h.


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