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
qquick3dxrhandtrackerinput_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 QQUICK3DXRHANDTRACKERINPUT_H
5#define QQUICK3DXRHANDTRACKERINPUT_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 <QObject>
19#include <QVector2D>
20#include <QVector3D>
21#include <QQuaternion>
22#include <QtQml/qqml.h>
23#include <private/qquick3dmodel_p.h>
24
25#include <QQuick3DGeometry>
26#include <QtQuick3DXr/private/qtquick3dxrglobal_p.h>
27
29
31
33{
35 Q_DECLARE_PRIVATE(QQuick3DXrHandTrackerInput)
36
43
44 QML_NAMED_ELEMENT(XrHandTrackerInput)
45 QML_UNCREATABLE("Created by XrView")
47
48public:
51
54
55 bool isActive() const;
57 void setIsActive(bool isActive);
58
59 const QVector3D &posePosition() const;
60 const QQuaternion &poseRotation() const;
61
63 void setJointPositionsAndRotations(const QList<QVector3D> &newJointPositions, const QList<QQuaternion> &newJointRotations);
64
66
67 QVector3D pokePosition() const;
68 void setPokePosition(const QVector3D &newPokePosition);
69
70public Q_SLOTS:
72
76
79
82
84
86
88 bool m_isActive = false;
89 HandPoseSpace m_poseSpace = HandPoseSpace::GripPose;
90
91 QVector3D m_posePosition;
92 QQuaternion m_poseRotation;
93
94 QList<QVector3D> m_jointPositions;
95 QList<QQuaternion> m_jointRotations;
96 QVector3D m_pokePosition;
97
98 std::unique_ptr<QQuick3DXrHandTrackerInputPrivate> d_ptr;
99};
100
102{
104
105 Q_PROPERTY(QQuick3DXrHandTrackerInput *handTracker READ handTracker WRITE setHandTracker NOTIFY handTrackerChanged FINAL)
106
107 QML_NAMED_ELEMENT(XrHandModel)
109
110public:
112
113 void componentComplete() override;
114
115 QQuick3DXrHandTrackerInput *handTracker() const;
116 void setHandTracker(QQuick3DXrHandTrackerInput *newHandTracker);
117
119 void handChanged();
120 void handTrackerChanged();
121
123 void updatePose();
124
125private:
126 void setupModel();
127 QQuick3DXrHandTrackerInput *m_handTracker = nullptr;
128 bool m_initialized = false;
129};
130
132
133#endif // QQUICK3DXRHANDTRACKERINPUT_H
Definition qlist.h:76
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
The QQuaternion class represents a quaternion consisting of a vector and scalar.
void setPokePosition(const QVector3D &newPokePosition)
void setPoseSpace(HandPoseSpace poseSpace)
\qmlproperty vector3d XrHandTrackerInput::posePosition
void setJointPositionsAndRotations(const QList< QVector3D > &newJointPositions, const QList< QQuaternion > &newJointRotations)
const QQuaternion & poseRotation() const
The QVector3D class represents a vector or vertex in 3D space.
Definition qvectornd.h:171
Combined button and popup list for selecting options.
GLbyte by
#define QML_UNCREATABLE(REASON)
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
#define explicit