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
qquick3dpointlight_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 QSSGPOINTLIGHT_H
7#define QSSGPOINTLIGHT_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 QQuick3DPointLight : public QQuick3DAbstractLight
27{
28 Q_OBJECT
29 Q_PROPERTY(float constantFade READ constantFade WRITE setConstantFade NOTIFY constantFadeChanged)
30 Q_PROPERTY(float linearFade READ linearFade WRITE setLinearFade NOTIFY linearFadeChanged)
31 Q_PROPERTY(float quadraticFade READ quadraticFade WRITE setQuadraticFade NOTIFY quadraticFadeChanged)
32
33 QML_NAMED_ELEMENT(PointLight)
34
35public:
36 explicit QQuick3DPointLight(QQuick3DNode *parent = nullptr);
37 ~QQuick3DPointLight() override {}
38
39 float constantFade() const;
40 float linearFade() const;
41 float quadraticFade() const;
42
43public Q_SLOTS:
44 void setConstantFade(float constantFade);
45 void setLinearFade(float linearFade);
46 void setQuadraticFade(float quadraticFade);
47
48Q_SIGNALS:
49 void constantFadeChanged();
50 void linearFadeChanged();
51 void quadraticFadeChanged();
52
53protected:
54 QSSGRenderGraphObject *updateSpatialNode(QSSGRenderGraphObject *node) override;
55
56private:
57 float m_constantFade = 1.0f;
58 float m_linearFade = 0.0f;
59 float m_quadraticFade = 1.0f;
60};
61
62QT_END_NAMESPACE
63#endif // QSSGPOINTLIGHT_H
Combined button and popup list for selecting options.