QGIS API Documentation 3.43.0-Master (a6cade80589)
|
Container class that holds different objects related to frame graphs of 3D scenes. More...
#include <qgsframegraph.h>
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. | |
bool | ambientOcclusionEnabled () const |
Returns whether Screen Space Ambient Occlusion is enabled. | |
float | ambientOcclusionIntensity () const |
Returns the ambient occlusion intensity. | |
float | ambientOcclusionRadius () const |
Returns the ambient occlusion radius. | |
float | ambientOcclusionThreshold () const |
Returns the ambient occlusion threshold. | |
Qt3DRender::QTexture2D * | blurredAmbientOcclusionFactorMap () |
Returns blurred ambient occlusion factor values texture. | |
Qt3DRender::QRenderCapture * | depthRenderCapture () |
Returns the render capture object used to take an image of the depth buffer of the scene. | |
QgsDepthRenderView & | depthRenderView () |
Returns depth renderview. | |
QString | dumpFrameGraph () const |
Dumps frame graph as string. | |
QString | dumpSceneGraph () const |
Dumps scene graph as string. | |
QgsForwardRenderView & | forwardRenderView () |
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. | |
QgsPostprocessingEntity * | postprocessingEntity () |
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. | |
QgsAbstractRenderView * | renderView (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 | setAmbientOcclusionEnabled (bool enabled) |
Sets whether Screen Space Ambient Occlusion will be enabled. | |
void | setAmbientOcclusionIntensity (float intensity) |
Sets the ambient occlusion intensity. | |
void | setAmbientOcclusionRadius (float radius) |
Sets the ambient occlusion radius. | |
void | setAmbientOcclusionThreshold (float threshold) |
Sets the ambient occlusion threshold. | |
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. | |
QgsShadowRenderView & | shadowRenderView () |
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 | 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" |
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.
Definition at line 67 of file qgsframegraph.h.
QgsFrameGraph::QgsFrameGraph | ( | QSurface * | surface, |
QSize | s, | ||
Qt3DRender::QCamera * | mainCamera, | ||
Qt3DCore::QEntity * | root | ||
) |
Constructor.
Definition at line 311 of file qgsframegraph.cpp.
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.
Definition at line 618 of file qgsframegraph.cpp.
|
inline |
Returns whether Screen Space Ambient Occlusion is enabled.
Definition at line 112 of file qgsframegraph.h.
|
inline |
Returns the ambient occlusion intensity.
Definition at line 124 of file qgsframegraph.h.
|
inline |
Returns the ambient occlusion radius.
Definition at line 136 of file qgsframegraph.h.
|
inline |
Returns the ambient occlusion threshold.
Definition at line 148 of file qgsframegraph.h.
|
inline |
Returns blurred ambient occlusion factor values texture.
Definition at line 82 of file qgsframegraph.h.
Qt3DRender::QRenderCapture * QgsFrameGraph::depthRenderCapture | ( | ) |
Returns the render capture object used to take an image of the depth buffer of the scene.
Definition at line 306 of file qgsframegraph.cpp.
QgsDepthRenderView & QgsFrameGraph::depthRenderView | ( | ) |
QString QgsFrameGraph::dumpFrameGraph | ( | ) | const |
Dumps frame graph as string.
Definition at line 519 of file qgsframegraph.cpp.
QString QgsFrameGraph::dumpSceneGraph | ( | ) | const |
Dumps scene graph as string.
Definition at line 532 of file qgsframegraph.cpp.
QgsForwardRenderView & QgsFrameGraph::forwardRenderView | ( | ) |
|
inline |
Returns the root of the frame graph object.
Definition at line 76 of file qgsframegraph.h.
bool QgsFrameGraph::isRenderViewEnabled | ( | const QString & | name | ) |
Returns true if the render view named name is found and enabled.
Definition at line 434 of file qgsframegraph.cpp.
|
inline |
Returns the main camera.
Definition at line 85 of file qgsframegraph.h.
|
inline |
Returns the postprocessing entity.
Definition at line 88 of file qgsframegraph.h.
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.
Definition at line 401 of file qgsframegraph.cpp.
void QgsFrameGraph::removeClipPlanes | ( | ) |
Disables OpenGL clipping.
Definition at line 613 of file qgsframegraph.cpp.
|
inline |
Returns the render capture object used to take an image of the scene.
Definition at line 94 of file qgsframegraph.h.
|
inline |
Returns whether it will be possible to render to an image.
Definition at line 168 of file qgsframegraph.h.
QgsAbstractRenderView * QgsFrameGraph::renderView | ( | const QString & | name | ) |
Returns the render view named name, if any.
Definition at line 425 of file qgsframegraph.cpp.
|
inline |
Returns entity for all rubber bands (to show them always on top)
Definition at line 91 of file qgsframegraph.h.
void QgsFrameGraph::setAmbientOcclusionEnabled | ( | bool | enabled | ) |
Sets whether Screen Space Ambient Occlusion will be enabled.
Definition at line 543 of file qgsframegraph.cpp.
void QgsFrameGraph::setAmbientOcclusionIntensity | ( | float | intensity | ) |
Sets the ambient occlusion intensity.
Definition at line 550 of file qgsframegraph.cpp.
void QgsFrameGraph::setAmbientOcclusionRadius | ( | float | radius | ) |
void QgsFrameGraph::setAmbientOcclusionThreshold | ( | float | threshold | ) |
Sets the ambient occlusion threshold.
Definition at line 562 of file qgsframegraph.cpp.
void QgsFrameGraph::setClearColor | ( | const QColor & | clearColor | ) |
Sets the clear color of the scene (background color)
Definition at line 538 of file qgsframegraph.cpp.
void QgsFrameGraph::setDebugOverlayEnabled | ( | bool | enabled | ) |
Sets whether debug overlay is enabled.
Definition at line 608 of file qgsframegraph.cpp.
void QgsFrameGraph::setFrustumCullingEnabled | ( | bool | enabled | ) |
Sets whether frustum culling is enabled.
Definition at line 568 of file qgsframegraph.cpp.
void QgsFrameGraph::setRenderCaptureEnabled | ( | bool | enabled | ) |
Sets whether it will be possible to render to an image.
Definition at line 600 of file qgsframegraph.cpp.
void QgsFrameGraph::setRenderViewEnabled | ( | const QString & | name, |
bool | enable | ||
) |
Enables or disables the render view named name according to enable.
Definition at line 417 of file qgsframegraph.cpp.
void QgsFrameGraph::setSize | ( | QSize | s | ) |
Sets the size of the buffers used for rendering.
Definition at line 583 of file qgsframegraph.cpp.
void QgsFrameGraph::setupEyeDomeLighting | ( | bool | enabled, |
double | strength, | ||
int | distance | ||
) |
Sets eye dome lighting shading related settings.
Definition at line 573 of file qgsframegraph.cpp.
QgsShadowRenderView & QgsFrameGraph::shadowRenderView | ( | ) |
void QgsFrameGraph::unregisterRenderView | ( | const QString & | name | ) |
Unregisters the render view named name, if any.
Definition at line 392 of file qgsframegraph.cpp.
void QgsFrameGraph::updateDebugDepthMapSettings | ( | const Qgs3DMapSettings & | settings | ) |
Updates settings for depth debug map.
Definition at line 495 of file qgsframegraph.cpp.
void QgsFrameGraph::updateDebugShadowMapSettings | ( | const Qgs3DMapSettings & | settings | ) |
Updates settings for shadows debug map.
Definition at line 471 of file qgsframegraph.cpp.
void QgsFrameGraph::updateShadowSettings | ( | const QgsShadowSettings & | shadowSettings, |
const QList< QgsLightSource * > & | lightSources | ||
) |
Updates shadow bias, light and texture size according to shadowSettings and lightSources.
Definition at line 439 of file qgsframegraph.cpp.
|
static |
Definition at line 270 of file qgsframegraph.h.
|
static |
Definition at line 272 of file qgsframegraph.h.
|
static |
Definition at line 271 of file qgsframegraph.h.
|
static |
Definition at line 268 of file qgsframegraph.h.
|
static |
Definition at line 269 of file qgsframegraph.h.