Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquick3ddirectionallight_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5
6#ifndef QSSGDIRECTIONALLIGHT_H
7#define QSSGDIRECTIONALLIGHT_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QtQuick3D/private/qquick3dabstractlight_p.h>
21
22#include <QColor>
23
25
26class Q_QUICK3D_EXPORT QQuick3DDirectionalLight : public QQuick3DAbstractLight
27{
28 Q_OBJECT
29
30 QML_NAMED_ELEMENT(DirectionalLight)
31
32 Q_PROPERTY(float csmSplit1 READ csmSplit1 WRITE setCsmSplit1 NOTIFY csmSplit1Changed FINAL REVISION(6, 8))
33 Q_PROPERTY(float csmSplit2 READ csmSplit2 WRITE setCsmSplit2 NOTIFY csmSplit2Changed FINAL REVISION(6, 8))
34 Q_PROPERTY(float csmSplit3 READ csmSplit3 WRITE setCsmSplit3 NOTIFY csmSplit3Changed FINAL REVISION(6, 8))
35 Q_PROPERTY(int csmNumSplits READ csmNumSplits WRITE setCsmNumSplits NOTIFY csmNumSplitsChanged FINAL REVISION(6, 8))
36 Q_PROPERTY(float csmBlendRatio READ csmBlendRatio WRITE setCsmBlendRatio NOTIFY csmBlendRatioChanged FINAL REVISION(6, 8))
37 Q_PROPERTY(bool lockShadowmapTexels READ lockShadowmapTexels WRITE setLockShadowmapTexels NOTIFY
38 lockShadowmapTexelsChanged FINAL REVISION(6, 9))
39
40public:
41 explicit QQuick3DDirectionalLight(QQuick3DNode *parent = nullptr);
42 ~QQuick3DDirectionalLight() override {}
44 Q_REVISION(6, 8) float csmSplit1() const;
45 Q_REVISION(6, 8) float csmSplit2() const;
46 Q_REVISION(6, 8) float csmSplit3() const;
47 Q_REVISION(6, 8) int csmNumSplits() const;
48 Q_REVISION(6, 8) float csmBlendRatio() const;
49 Q_REVISION(6, 9) bool lockShadowmapTexels() const;
51 Q_REVISION(6, 8) void setCsmSplit1(float newcsmSplit1);
52 Q_REVISION(6, 8) void setCsmSplit2(float newcsmSplit2);
53 Q_REVISION(6, 8) void setCsmSplit3(float newcsmSplit3);
54 Q_REVISION(6, 8) void setCsmNumSplits(int newcsmNumSplits);
55 Q_REVISION(6, 8) void setCsmBlendRatio(float newcsmBlendRatio);
56 Q_REVISION(6, 9) void setLockShadowmapTexels(bool newLockShadowmapTexels);
57
58Q_SIGNALS:
59 Q_REVISION(6, 8) void csmSplit1Changed();
60 Q_REVISION(6, 8) void csmSplit2Changed();
61 Q_REVISION(6, 8) void csmSplit3Changed();
62 Q_REVISION(6, 8) void csmNumSplitsChanged();
63 Q_REVISION(6, 8) void csmBlendRatioChanged();
64 Q_REVISION(6, 9) void lockShadowmapTexelsChanged();
65
66protected:
67 QSSGRenderGraphObject *updateSpatialNode(QSSGRenderGraphObject *node) override;
68
69private:
70 float m_csmSplit1 = 0.1f;
71 float m_csmSplit2 = 0.25f;
72 float m_csmSplit3 = 0.5f;
73 int m_csmNumSplits = 0;
74 float m_csmBlendRatio = 0.05f;
75 bool m_lockShadowmapTexels = false;
76};
77
78QT_END_NAMESPACE
79#endif // QSSGDIRECTIONALLIGHT_H
Combined button and popup list for selecting options.