QGIS API Documentation 3.41.0-Master (cea29feecf2)
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::QLayer *layer, 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 Qt3DRender::QParameter *mDepthTextureParameter = nullptr;
49 Qt3DRender::QParameter *mAmbientOcclusionKernelParameter = nullptr;
50
51 // user configurable
52 Qt3DRender::QParameter *mIntensityParameter = nullptr;
53 Qt3DRender::QParameter *mRadiusParameter = nullptr;
54 Qt3DRender::QParameter *mThresholdParameter = nullptr;
55
56 // derived from camera parameters
57 Qt3DRender::QParameter *mFarPlaneParameter = nullptr;
58 Qt3DRender::QParameter *mNearPlaneParameter = nullptr;
59 Qt3DRender::QParameter *mProjMatrixParameter = nullptr;
60 Qt3DRender::QParameter *mAspectRatioParameter = nullptr;
61 Qt3DRender::QParameter *mTanHalfFovParameter = nullptr;
62};
63
64#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.