QGIS API Documentation 3.38.0-Grenoble (exported)
Loading...
Searching...
No Matches
qgsambientocclusionrenderentity.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsambientocclusionrenderentity.h
3 --------------------------------------
4 Date : June 2022
5 Copyright : (C) 2022 by Belgacem Nedjima
6 Email : belgacem dot nedjima at gmail dot com
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 QGSAMBIENTOCCLUSIONRENDERENTITY_H
17#define QGSAMBIENTOCCLUSIONRENDERENTITY_H
18
19#include "qgsrenderpassquad.h"
20
21#define SIP_NO_FILE
22
32{
33 Q_OBJECT
34 public:
36 QgsAmbientOcclusionRenderEntity( Qt3DRender::QTexture2D *depthTexture, Qt3DRender::QCamera *camera, QNode *parent = nullptr );
37
39 void setIntensity( float intensity );
40
42 void setRadius( float radius );
43
45 void setThreshold( float threshold );
46
47 private:
48
49 Qt3DRender::QParameter *mDepthTextureParameter = nullptr;
50 Qt3DRender::QParameter *mAmbientOcclusionKernelParameter = nullptr;
51
52 // user configurable
53 Qt3DRender::QParameter *mIntensityParameter = nullptr;
54 Qt3DRender::QParameter *mRadiusParameter = nullptr;
55 Qt3DRender::QParameter *mThresholdParameter = nullptr;
56
57 // derived from camera parameters
58 Qt3DRender::QParameter *mFarPlaneParameter = nullptr;
59 Qt3DRender::QParameter *mNearPlaneParameter = nullptr;
60 Qt3DRender::QParameter *mProjMatrixParameter = nullptr;
61 Qt3DRender::QParameter *mAspectRatioParameter = nullptr;
62 Qt3DRender::QParameter *mTanHalfFovParameter = nullptr;
63};
64
65#endif // QGSAMBIENTOCCLUSIONRENDERENTITY_H
void setThreshold(float threshold)
Sets the amount of occlusion when the effects starts to kick in.
void setRadius(float radius)
Sets the radius for the ambient occlusion effect.
void setIntensity(float intensity)
Sets the intensity for the ambient occlusion effect.