| 1 | // Copyright (C) 2015 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_QCLIPPLANE_H |
| 5 | #define QT3DRENDER_QCLIPPLANE_H |
| 6 | |
| 7 | #include <Qt3DRender/qrenderstate.h> |
| 8 | #include <QtGui/qvector3d.h> |
| 9 | |
| 10 | QT_BEGIN_NAMESPACE |
| 11 | |
| 12 | namespace Qt3DRender { |
| 13 | |
| 14 | class QClipPlanePrivate; |
| 15 | |
| 16 | class Q_3DRENDERSHARED_EXPORT QClipPlane : public QRenderState |
| 17 | { |
| 18 | Q_OBJECT |
| 19 | Q_PROPERTY(int planeIndex READ planeIndex WRITE setPlaneIndex NOTIFY planeIndexChanged) |
| 20 | Q_PROPERTY(QVector3D normal READ normal WRITE setNormal NOTIFY normalChanged) |
| 21 | Q_PROPERTY(float distance READ distance WRITE setDistance NOTIFY distanceChanged) |
| 22 | public: |
| 23 | explicit QClipPlane(Qt3DCore::QNode *parent = nullptr); |
| 24 | ~QClipPlane(); |
| 25 | |
| 26 | int planeIndex() const; |
| 27 | QVector3D normal() const; |
| 28 | float distance() const; |
| 29 | |
| 30 | public Q_SLOTS: |
| 31 | void setPlaneIndex(int); |
| 32 | void setNormal(QVector3D); |
| 33 | void setDistance(float); |
| 34 | |
| 35 | Q_SIGNALS: |
| 36 | void planeIndexChanged(int planeIndex); |
| 37 | void normalChanged(QVector3D normal); |
| 38 | void distanceChanged(float distance); |
| 39 | |
| 40 | private: |
| 41 | Q_DECLARE_PRIVATE(QClipPlane) |
| 42 | }; |
| 43 | |
| 44 | } // namespace Qt3DRender |
| 45 | |
| 46 | QT_END_NAMESPACE |
| 47 | |
| 48 | #endif // QT3DRENDER_QCLIPPLANE_H |
| 49 |
