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
10QT_BEGIN_NAMESPACE
11
12namespace Qt3DRender {
13
14class QProximityFilterPrivate;
15
16class 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
22public:
23 explicit QProximityFilter(Qt3DCore::QNode *parent = nullptr);
24 ~QProximityFilter();
25
26 Qt3DCore::QEntity *entity() const;
27 float distanceThreshold() const;
28
29public Q_SLOTS:
30 void setEntity(Qt3DCore::QEntity *entity);
31 void setDistanceThreshold(float distanceThreshold);
32
33Q_SIGNALS:
34 void entityChanged(Qt3DCore::QEntity *entity);
35 void distanceThresholdChanged(float distanceThreshold);
36
37protected:
38 explicit QProximityFilter(QProximityFilterPrivate &dd, Qt3DCore::QNode *parent = nullptr);
39
40private:
41 Q_DECLARE_PRIVATE(QProximityFilter)
42};
43
44} // namespace Qt3DRender
45
46QT_END_NAMESPACE
47
48#endif // QT3DRENDER_QPROXIMITYFILTER_H
49

source code of qt3d/src/render/framegraph/qproximityfilter.h