QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
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, Qt3DRender::QLayer *layer, QNode *parent = nullptr );
41 void setupShadowRenderingExtent( float minX, float maxX, float minY, float maxY );
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 Qt3DRender::QCamera *mMainCamera = nullptr;
63
64 Qt3DRender::QParameter *mColorTextureParameter = nullptr;
65 Qt3DRender::QParameter *mDepthTextureParameter = nullptr;
66 Qt3DRender::QParameter *mShadowMapParameter = nullptr;
67 Qt3DRender::QParameter *mAmbientOcclusionTextureParameter = nullptr;
68 Qt3DRender::QParameter *mFarPlaneParameter = nullptr;
69 Qt3DRender::QParameter *mNearPlaneParameter = nullptr;
70 Qt3DRender::QParameter *mMainCameraInvViewMatrixParameter = nullptr;
71 Qt3DRender::QParameter *mMainCameraInvProjMatrixParameter = nullptr;
72
73 Qt3DRender::QCamera *mLightCamera = nullptr;
74 Qt3DRender::QParameter *mLightFarPlaneParameter = nullptr;
75 Qt3DRender::QParameter *mLightNearPlaneParameter = nullptr;
76
77 Qt3DRender::QParameter *mLightPosition = nullptr;
78 Qt3DRender::QParameter *mLightDirection = nullptr;
79
80 Qt3DRender::QParameter *mShadowMinX = nullptr;
81 Qt3DRender::QParameter *mShadowMaxX = nullptr;
82 Qt3DRender::QParameter *mShadowMinY = nullptr;
83 Qt3DRender::QParameter *mShadowMaxY = nullptr;
84
85 Qt3DRender::QParameter *mRenderShadowsParameter = nullptr;
86 Qt3DRender::QParameter *mShadowBiasParameter = nullptr;
87 Qt3DRender::QParameter *mEyeDomeLightingEnabledParameter = nullptr;
88 Qt3DRender::QParameter *mEyeDomeLightingStrengthParameter = nullptr;
89 Qt3DRender::QParameter *mEyeDomeLightingDistanceParameter = nullptr;
90
91 Qt3DRender::QParameter *mAmbientOcclusionEnabledParameter = nullptr;
92};
93
94#endif // QGSPOSTPROCESSINGENTITY_H
void setupShadowRenderingExtent(float minX, float maxX, float minY, float maxY)
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.
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.