1// Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QT3DRENDER_QENVIRONMENTLIGHT_H
5#define QT3DRENDER_QENVIRONMENTLIGHT_H
6
7#include <Qt3DRender/qt3drender_global.h>
8#include <Qt3DCore/qcomponent.h>
9
10QT_BEGIN_NAMESPACE
11
12namespace Qt3DRender {
13
14class QAbstractTexture;
15class QEnvironmentLightPrivate;
16
17class Q_3DRENDERSHARED_EXPORT QEnvironmentLight : public Qt3DCore::QComponent
18{
19 Q_OBJECT
20 Q_PROPERTY(Qt3DRender::QAbstractTexture *irradiance READ irradiance WRITE setIrradiance NOTIFY irradianceChanged)
21 Q_PROPERTY(Qt3DRender::QAbstractTexture *specular READ specular WRITE setSpecular NOTIFY specularChanged)
22
23public:
24 explicit QEnvironmentLight(Qt3DCore::QNode *parent = nullptr);
25 ~QEnvironmentLight();
26
27 Qt3DRender::QAbstractTexture *irradiance() const;
28 Qt3DRender::QAbstractTexture *specular() const;
29
30public Q_SLOTS:
31 void setIrradiance(Qt3DRender::QAbstractTexture *irradiance);
32 void setSpecular(Qt3DRender::QAbstractTexture *specular);
33
34protected:
35 explicit QEnvironmentLight(QEnvironmentLightPrivate &dd, Qt3DCore::QNode *parent = nullptr);
36
37Q_SIGNALS:
38 void irradianceChanged(Qt3DRender::QAbstractTexture *environmentIrradiance);
39 void specularChanged(Qt3DRender::QAbstractTexture *environmentSpecular);
40
41private:
42 Q_DECLARE_PRIVATE(QEnvironmentLight)
43
44 Q_PRIVATE_SLOT(d_func(), void _q_updateEnvMapsSize())
45};
46
47} // namespace Qt3DRender
48
49QT_END_NAMESPACE
50
51#endif // QT3DRENDER_QENVIRONMENTLIGHT_H
52

source code of qt3d/src/render/lights/qenvironmentlight.h