1// Copyright (C) 2018 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_QSCREENRAYCASTER_H
5#define QT3DRENDER_QSCREENRAYCASTER_H
6
7#include <Qt3DRender/qt3drender_global.h>
8#include <Qt3DRender/QAbstractRayCaster>
9
10#include <QtGui/QVector3D>
11
12QT_BEGIN_NAMESPACE
13
14namespace Qt3DRender {
15
16class Q_3DRENDERSHARED_EXPORT QScreenRayCaster : public QAbstractRayCaster
17{
18 Q_OBJECT
19 Q_PROPERTY(QPoint position READ position WRITE setPosition NOTIFY positionChanged)
20public:
21 explicit QScreenRayCaster(QNode *parent = nullptr);
22 ~QScreenRayCaster();
23
24 QPoint position() const;
25
26public Q_SLOTS:
27 void setPosition(const QPoint &position);
28
29 void trigger();
30 void trigger(const QPoint &position);
31 Hits pick(const QPoint &position);
32
33Q_SIGNALS:
34 void positionChanged(const QPoint &position);
35
36protected:
37 explicit QScreenRayCaster(QAbstractRayCasterPrivate &dd, QNode *parent = nullptr);
38};
39
40} // Qt3D
41
42QT_END_NAMESPACE
43
44#endif // QT3DRENDER_QSCREENRAYCASTER_H
45

source code of qt3d/src/render/picking/qscreenraycaster.h