QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
framegraph
qgsshadowrenderview.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsshadowrenderview.h
3
--------------------------------------
4
Date : June 2024
5
Copyright : (C) 2024 by Benoit De Mezzo and (C) 2020 by Belgacem Nedjima
6
Email : benoit dot de dot mezzo at oslandia 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 QGSSHADOWRENDERVIEW_H
17
#define QGSSHADOWRENDERVIEW_H
18
19
#include "
qgs3d.h
"
20
#include "
qgsabstractrenderview.h
"
21
22
#define SIP_NO_FILE
23
24
class
QColor;
25
class
QRect;
26
class
QSurface;
27
28
namespace
Qt3DCore
29
{
30
class
QEntity;
31
}
32
33
namespace
Qt3DRender
34
{
35
class
QRenderSettings;
36
class
QCamera;
37
class
QFrameGraphNode;
38
class
QLayer;
39
class
QViewport;
40
class
QSubtreeEnabler;
41
class
QTexture2D;
42
class
QCameraSelector;
43
class
QLayerFilter;
44
class
QRenderTargetSelector;
45
class
QClearBuffers;
46
class
QRenderStateSet;
47
class
QRenderTarget;
48
class
QRenderTargetOutput;
49
class
QTexture2DArray;
50
}
// namespace Qt3DRender
51
52
namespace
Qt3DExtras
53
{
54
class
Qt3DWindow;
55
}
56
57
class
QgsShadowSettings
;
58
class
QgsDirectionalLightSettings
;
59
class
QgsLightSource
;
60
61
70
class
QgsShadowRenderView
:
public
QgsAbstractRenderView
71
{
72
public
:
74
QgsShadowRenderView
(
const
QString &viewName, Qt3DCore::QEntity *rootEntity );
75
77
void
setEnabled
(
bool
enable )
override
;
78
80
Qt3DRender::QCamera *
lightCamera
(
int
index );
81
83
Qt3DRender::QTexture2DArray *
mapTextureArray
()
const
;
84
86
Qt3DRender::QLayer *
entityCastingShadowsLayer
()
const
;
87
89
void
setMapSize
(
int
width,
int
height );
90
91
private
:
92
static
constexpr
int
mDefaultMapResolution = 2048;
93
Qt3DCore::QEntity *mRootEntity =
nullptr
;
94
95
// Shadow rendering pass branch nodes:
96
Qt3DRender::QLayer *mEntityCastingShadowsLayer =
nullptr
;
97
Qt3DRender::QLayerFilter *mLayerFilter =
nullptr
;
98
Qt3DRender::QCamera *mLightCameras[
Qgs3D::NUM_SHADOW_CASCADES
] = {
nullptr
};
99
Qt3DRender::QTexture2DArray *mMapTextureArray =
nullptr
;
100
101
void
buildRenderPass();
102
};
103
104
#endif
// QGSSHADOWRENDERVIEW_H
Qgs3D::NUM_SHADOW_CASCADES
static constexpr int NUM_SHADOW_CASCADES
Number of shadow map cascades.
Definition
qgs3d.h:113
QgsAbstractRenderView::QgsAbstractRenderView
QgsAbstractRenderView(const QString &viewName)
Constructor for QgsAbstractRenderView with the specified parent object.
Definition
qgsabstractrenderview.cpp:21
QgsDirectionalLightSettings
Definition of a directional light in a 3D map scene.
Definition
qgsdirectionallightsettings.h:34
QgsLightSource
Base class for light sources in 3d scenes.
Definition
qgslightsource.h:47
QgsShadowRenderView::entityCastingShadowsLayer
Qt3DRender::QLayer * entityCastingShadowsLayer() const
Returns the layer to be used by entities to be included in this renderview.
Definition
qgsshadowrenderview.cpp:126
QgsShadowRenderView::lightCamera
Qt3DRender::QCamera * lightCamera(int index)
Returns the light camera with the specified index.
Definition
qgsshadowrenderview.cpp:54
QgsShadowRenderView::setMapSize
void setMapSize(int width, int height)
Update shadow depth texture size.
Definition
qgsshadowrenderview.cpp:131
QgsShadowRenderView::setEnabled
void setEnabled(bool enable) override
Enable or disable via enable the renderview sub tree.
Definition
qgsshadowrenderview.cpp:48
QgsShadowRenderView::mapTextureArray
Qt3DRender::QTexture2DArray * mapTextureArray() const
Returns the shadow depth texture array.
Definition
qgsshadowrenderview.cpp:136
QgsShadowRenderView::QgsShadowRenderView
QgsShadowRenderView(const QString &viewName, Qt3DCore::QEntity *rootEntity)
Default constructor.
Definition
qgsshadowrenderview.cpp:36
QgsShadowSettings
Contains configuration for rendering shadows.
Definition
qgsshadowsettings.h:37
Qt3DCore
Definition
qgsabstract3drenderer.h:33
Qt3DExtras
Definition
qgs3daxis.h:39
Qt3DRender
Definition
qgs3d.h:45
qgs3d.h
qgsabstractrenderview.h
Generated on
for QGIS API Documentation by
1.17.0