QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
qgspostprocessingentity.h
Go to the documentation of this file.
1/***************************************************************************
2 qgspostprocessingentity.h
3 --------------------------------------
4 Date : August 2020
5 Copyright : (C) 2020 by Belgacem Nedjima
6 Email : gb underscore nedjima at esi dot dz
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSPOSTPROCESSINGENTITY_H
17#define QGSPOSTPROCESSINGENTITY_H
18
19#include "qgsrenderpassquad.h"
20
21class QgsFrameGraph;
22
23#define SIP_NO_FILE
24
34{
35 Q_OBJECT
36
37 public:
39 QgsPostprocessingEntity( QgsFrameGraph *frameGraph, QNode *parent = nullptr );
41 void setupShadowRenderingExtent( float minX, float maxX, float minZ, float maxZ );
43 void setupDirectionalLight( QVector3D position, QVector3D direction );
45 void setShadowRenderingEnabled( bool enabled );
47 void setShadowBias( float shadowBias );
49 void setEyeDomeLightingEnabled( bool enabled );
51 void setEyeDomeLightingStrength( double strength );
53 void setEyeDomeLightingDistance( int distance );
54
59 void setAmbientOcclusionEnabled( bool enabled );
60
61 private:
62 QgsFrameGraph *mFrameGraph = nullptr;
63 Qt3DRender::QCamera *mMainCamera = nullptr;
64
65 Qt3DRender::QParameter *mColorTextureParameter = nullptr;
66 Qt3DRender::QParameter *mDepthTextureParameter = nullptr;
67 Qt3DRender::QParameter *mShadowMapParameter = nullptr;
68 Qt3DRender::QParameter *mAmbientOcclusionTextureParameter = nullptr;
69 Qt3DRender::QParameter *mFarPlaneParameter = nullptr;
70 Qt3DRender::QParameter *mNearPlaneParameter = nullptr;
71 Qt3DRender::QParameter *mMainCameraInvViewMatrixParameter = nullptr;
72 Qt3DRender::QParameter *mMainCameraInvProjMatrixParameter = nullptr;
73
74 Qt3DRender::QCamera *mLightCamera = nullptr;
75 Qt3DRender::QParameter *mLightFarPlaneParameter = nullptr;
76 Qt3DRender::QParameter *mLightNearPlaneParameter = nullptr;
77
78 Qt3DRender::QParameter *mLightPosition = nullptr;
79 Qt3DRender::QParameter *mLightDirection = nullptr;
80
81 Qt3DRender::QParameter *mShadowMinX = nullptr;
82 Qt3DRender::QParameter *mShadowMaxX = nullptr;
83 Qt3DRender::QParameter *mShadowMinZ = nullptr;
84 Qt3DRender::QParameter *mShadowMaxZ = nullptr;
85
86 Qt3DRender::QParameter *mRenderShadowsParameter = nullptr;
87 Qt3DRender::QParameter *mShadowBiasParameter = nullptr;
88 Qt3DRender::QParameter *mEyeDomeLightingEnabledParameter = nullptr;
89 Qt3DRender::QParameter *mEyeDomeLightingStrengthParameter = nullptr;
90 Qt3DRender::QParameter *mEyeDomeLightingDistanceParameter = nullptr;
91
92 Qt3DRender::QParameter *mAmbientOcclusionEnabledParameter = nullptr;
93};
94
95#endif // QGSPOSTPROCESSINGENTITY_H
void setupShadowRenderingExtent(float minX, float maxX, float minZ, float maxZ)
Sets the parts of the scene where objects cast shadows.
void setAmbientOcclusionEnabled(bool enabled)
Sets whether screen space ambient occlusion is enabled.
void setShadowRenderingEnabled(bool enabled)
Sets whether shadow rendering is enabled.
void setEyeDomeLightingDistance(int distance)
Sets the eye dome lighting distance (contributes to the contrast of the image)
void setShadowBias(float shadowBias)
Sets the shadow bias value.
void setEyeDomeLightingStrength(double strength)
Sets the eye dome lighting strength.
QgsPostprocessingEntity(QgsFrameGraph *frameGraph, QNode *parent=nullptr)
Constructor.
void setupDirectionalLight(QVector3D position, QVector3D direction)
Sets up a directional light that is used to render shadows.
void setEyeDomeLightingEnabled(bool enabled)
Sets whether eye dome lighting is enabled.