| 1 | // Copyright (C) 2019 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_QDEPTHRANGE_H |
| 5 | #define QT3DRENDER_QDEPTHRANGE_H |
| 6 | |
| 7 | #include <Qt3DRender/qrenderstate.h> |
| 8 | #include <QtGui/qvector3d.h> |
| 9 | |
| 10 | QT_BEGIN_NAMESPACE |
| 11 | |
| 12 | namespace Qt3DRender { |
| 13 | |
| 14 | class QDepthRangePrivate; |
| 15 | |
| 16 | class Q_3DRENDERSHARED_EXPORT QDepthRange : public QRenderState |
| 17 | { |
| 18 | Q_OBJECT |
| 19 | Q_PROPERTY(double nearValue READ nearValue WRITE setNearValue NOTIFY nearValueChanged) |
| 20 | Q_PROPERTY(double farValue READ farValue WRITE setFarValue NOTIFY farValueChanged) |
| 21 | public: |
| 22 | explicit QDepthRange(Qt3DCore::QNode *parent = nullptr); |
| 23 | ~QDepthRange(); |
| 24 | |
| 25 | double nearValue() const; |
| 26 | double farValue() const; |
| 27 | |
| 28 | public Q_SLOTS: |
| 29 | void setNearValue(double value); |
| 30 | void setFarValue(double value); |
| 31 | |
| 32 | Q_SIGNALS: |
| 33 | void nearValueChanged(double nearValue); |
| 34 | void farValueChanged(double farValue); |
| 35 | |
| 36 | private: |
| 37 | Q_DECLARE_PRIVATE(QDepthRange) |
| 38 | }; |
| 39 | |
| 40 | } // namespace Qt3DRender |
| 41 | |
| 42 | QT_END_NAMESPACE |
| 43 | |
| 44 | #endif // QT3DRENDER_QDEPTHRANGE_H |
| 45 | |