1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QQUICK3DXINPUTMANAGER_P_H
5#define QQUICK3DXINPUTMANAGER_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 purely as an
12// implementation detail. 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 <QtQuick3DXr/private/qtquick3dxrglobal_p.h>
19
20#include <QtCore/qobject.h>
21
22QT_BEGIN_NAMESPACE
23
24class QQuick3DGeometry;
25
26class QQuick3DXrHandInput;
27class QQuick3DXrController;
28class QQuick3DXrInputManagerPrivate;
29
30class QQuick3DXrInputManager : public QObject
31{
32 Q_OBJECT
33 Q_DECLARE_PRIVATE(QQuick3DXrInputManager)
34
35public:
36 using Hand = QtQuick3DXr::Hand;
37 using HandPoseSpace = QtQuick3DXr::HandPoseSpace;
38
39 static QQuick3DXrInputManager *instance();
40
41 QQuick3DXrHandInput *leftHandInput() const;
42 QQuick3DXrHandInput *rightHandInput() const;
43
44 void registerController(QQuick3DXrController *controller);
45 void unregisterController(QQuick3DXrController *controller);
46
47 bool isValid() const;
48
49private:
50 explicit QQuick3DXrInputManager(QObject *parent = nullptr);
51 ~QQuick3DXrInputManager() override;
52
53 std::unique_ptr<QQuick3DXrInputManagerPrivate> d_ptr;
54};
55
56
57QT_END_NAMESPACE
58
59#endif // QQUICK3DXINPUTMANAGER_P_H
60

source code of qtquick3d/src/xr/quick3dxr/qquick3dxrinputmanager_p.h