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_QPICKEVENT_P_H
5#define QT3DRENDER_QPICKEVENT_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of other Qt classes. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <Qt3DCore/qnodeid.h>
19
20#include <private/qobject_p.h>
21#include <private/qt3drender_global_p.h>
22
23
24QT_BEGIN_NAMESPACE
25
26namespace Qt3DRender {
27
28class QPickEvent;
29class QViewport;
30
31class Q_3DRENDERSHARED_PRIVATE_EXPORT QPickEventPrivate : public QObjectPrivate
32{
33public:
34 QPickEventPrivate()
35 : QObjectPrivate()
36 , m_accepted(true)
37 , m_distance(-1.f)
38 , m_button(QPickEvent::NoButton)
39 , m_buttons(QPickEvent::NoButton)
40 , m_modifiers(QPickEvent::NoModifier)
41 , m_entityPtr(nullptr)
42 , m_viewport(nullptr)
43 {
44 }
45
46 bool m_accepted;
47 QPointF m_position;
48 QVector3D m_worldIntersection;
49 QVector3D m_localIntersection;
50 float m_distance;
51 QPickEvent::Buttons m_button;
52 int m_buttons;
53 int m_modifiers;
54 Qt3DCore::QNodeId m_entity;
55 Qt3DCore::QEntity *m_entityPtr;
56 QViewport *m_viewport;
57
58 static QPickEventPrivate *get(QPickEvent *object);
59};
60
61} // Qt3DRender
62
63QT_END_NAMESPACE
64
65#endif // QT3DRENDER_QPICKEVENT_P_H
66

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