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