Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquick3dxrinputmanager_visionos_p.h
Go to the documentation of this file.
1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QQUICK3DXINPUTMANAGER_VISIONOS_P_H
5#define QQUICK3DXINPUTMANAGER_VISIONOS_P_H
6
7#include <QtQuick3DXr/private/qtquick3dxrglobal_p.h>
8
9#ifdef __OBJC__
10#import <ARKit/ARKit.h>
11#else
12typedef struct ar_hand_anchor_s *ar_hand_anchor_t;
13typedef struct ar_hand_tracking_provider_s *ar_hand_tracking_provider_t;
14typedef struct ar_data_providers_s *ar_data_providers_t;
15#endif
16
17//
18// W A R N I N G
19// -------------
20//
21// This file is not part of the Qt API. It exists purely as an
22// implementation detail. This header file may change from version to
23// version without notice, or even be removed.
24//
25// We mean it.
26//
27
29
33
35{
36 Q_DECLARE_PUBLIC(QQuick3DXrInputManager)
37public:
39
42
43 // Two step process
44 // 1.
45 void prepareHandtracking(ar_data_providers_t dataProviders);
46 // 2.
47 void initHandtracking();
48
49 void teardown();
50
51 bool isValid() const { return m_initialized; }
52
54
56 void setPoseRotation(Hand hand, const QQuaternion &rotation);
57
60
62
64
65 void updateHandtracking();
66
67private:
68 QQuick3DXrInputManager *q_ptr = nullptr;
69 QQuick3DXrHandInput *m_handInputState[2] {};
70
71 ar_hand_tracking_provider_t m_handTrackingProvider;
72 ar_hand_anchor_t m_handAnchors[2] {};
73
74 bool m_isHandTrackingSupported = false;
75 bool m_initialized = false;
76
77 struct JointCache {
78 QList<QVector3D> positions;
79 QList<QQuaternion> rotations;
80 } jcache[2];
81};
82
84
85#endif // QQUICK3DXINPUTMANAGER_VISIONOS_P_H
The QQuaternion class represents a quaternion consisting of a vector and scalar.
static QQuick3DXrInputManagerPrivate * get(QQuick3DXrInputManager *inputManager)
void prepareHandtracking(ar_data_providers_t dataProviders)
QQuick3DXrHandInput * rightHandInput() const
void setPosePosition(Hand hand, const QVector3D &position)
void setPoseRotation(Hand hand, const QQuaternion &rotation)
QQuick3DXrInputManagerPrivate(QQuick3DXrInputManager &manager)
void setupHandModel(QQuick3DXrHandModel *model)
QQuick3DXrHandInput * leftHandInput() const
qsizetype getPokeJointIndex() const
The QVector3D class represents a vector or vertex in 3D space.
Definition qvectornd.h:171
Combined button and popup list for selecting options.
struct ar_hand_tracking_provider_s * ar_hand_tracking_provider_t
struct ar_data_providers_s * ar_data_providers_t
struct ar_hand_anchor_s * ar_hand_anchor_t
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
ptrdiff_t qsizetype
Definition qtypes.h:165
QSqlQueryModel * model
[16]
QNetworkAccessManager manager