1// Copyright (C) 2014 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_QDIRECTIONALLIGHT_H
5#define QT3DRENDER_QDIRECTIONALLIGHT_H
6
7#include <Qt3DRender/qabstractlight.h>
8
9QT_BEGIN_NAMESPACE
10
11namespace Qt3DRender {
12
13class QDirectionalLightPrivate;
14
15class Q_3DRENDERSHARED_EXPORT QDirectionalLight : public QAbstractLight
16{
17 Q_OBJECT
18 Q_PROPERTY(QVector3D worldDirection READ worldDirection WRITE setWorldDirection NOTIFY worldDirectionChanged)
19
20public:
21 explicit QDirectionalLight(Qt3DCore::QNode *parent = nullptr);
22 ~QDirectionalLight();
23
24 QVector3D worldDirection() const;
25
26public Q_SLOTS:
27 void setWorldDirection(const QVector3D &worldDirection);
28
29Q_SIGNALS:
30 void worldDirectionChanged(const QVector3D &worldDirection);
31
32protected:
33 explicit QDirectionalLight(QDirectionalLightPrivate &dd, Qt3DCore::QNode *parent = nullptr);
34
35private:
36 Q_DECLARE_PRIVATE(QDirectionalLight)
37};
38
39} // namespace Qt3DRender
40
41QT_END_NAMESPACE
42
43#endif // QT3DRENDER_QDIRECTIONALLIGHT_H
44

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