| 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_QPROXIMITYFILTER_H |
| 5 | #define QT3DRENDER_QPROXIMITYFILTER_H |
| 6 | |
| 7 | #include <Qt3DCore/qentity.h> |
| 8 | #include <Qt3DRender/qframegraphnode.h> |
| 9 | |
| 10 | QT_BEGIN_NAMESPACE |
| 11 | |
| 12 | namespace Qt3DRender { |
| 13 | |
| 14 | class QProximityFilterPrivate; |
| 15 | |
| 16 | class Q_3DRENDERSHARED_EXPORT QProximityFilter : public QFrameGraphNode |
| 17 | { |
| 18 | Q_OBJECT |
| 19 | Q_PROPERTY(Qt3DCore::QEntity *entity READ entity WRITE setEntity NOTIFY entityChanged) |
| 20 | Q_PROPERTY(float distanceThreshold READ distanceThreshold WRITE setDistanceThreshold NOTIFY distanceThresholdChanged) |
| 21 | |
| 22 | public: |
| 23 | explicit QProximityFilter(Qt3DCore::QNode *parent = nullptr); |
| 24 | ~QProximityFilter(); |
| 25 | |
| 26 | Qt3DCore::QEntity *entity() const; |
| 27 | float distanceThreshold() const; |
| 28 | |
| 29 | public Q_SLOTS: |
| 30 | void setEntity(Qt3DCore::QEntity *entity); |
| 31 | void setDistanceThreshold(float distanceThreshold); |
| 32 | |
| 33 | Q_SIGNALS: |
| 34 | void entityChanged(Qt3DCore::QEntity *entity); |
| 35 | void distanceThresholdChanged(float distanceThreshold); |
| 36 | |
| 37 | protected: |
| 38 | explicit QProximityFilter(QProximityFilterPrivate &dd, Qt3DCore::QNode *parent = nullptr); |
| 39 | |
| 40 | private: |
| 41 | Q_DECLARE_PRIVATE(QProximityFilter) |
| 42 | }; |
| 43 | |
| 44 | } // namespace Qt3DRender |
| 45 | |
| 46 | QT_END_NAMESPACE |
| 47 | |
| 48 | #endif // QT3DRENDER_QPROXIMITYFILTER_H |
| 49 |
