Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquick3dxrhandmodel_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{
34 Q_OBJECT
35
36 Q_PROPERTY(Hand hand READ hand WRITE setHand NOTIFY handChanged FINAL)
39
40public:
46 Q_ENUM(Hand)
47
49
51
52 Hand hand() const;
53 void setHand(Hand newHand);
54
58
59private Q_SLOTS:
60 void updatePose();
61
62private:
63 void setupModel();
64 QQuick3DXrHandInput *m_handTracker = nullptr;
65 bool m_initialized = false;
66 Hand m_hand;
67};
68
69QT_END_NAMESPACE
70
71#endif // QQUICK3DXRHANDTRACKERINPUT_H
static void registerAction(QQuick3DXrInputAction *action)
static void handleInput(QQuick3DXrInputAction::Action id, QQuick3DXrInputAction::Hand hand, const char *shortName, float value)
static void removeAction(QQuick3DXrInputAction *action)
void setIsHandTrackingActive(bool newIsHandTracking)
void setIsActive(bool isActive)
void isHandTrackingChanged()
void jointPositionsChanged()
void jointRotationsChanged()
void setJointPositionsAndRotations(const QList< QVector3D > &newJointPositions, const QList< QQuaternion > &newJointRotations)
QVector3D pokePosition() const
QList< QQuaternion > jointRotations() const
QList< QVector3D > jointPositions() const
void setPokePosition(const QVector3D &newPokePosition)
Hand hand() const
\qmlproperty enumeration XrHandModel::hand
void setHand(Hand newHand)
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
bool pressed() const
\qmlproperty bool XrInputAction::pressed
void classBegin() override
Invoked after class creation, but before any properties have been set.
void setPressed(bool newPressed)
QList< Action > actionId() const
\qmlproperty List<enumeration> XrInputAction::actionId
void setActionId(const QList< Action > &newActionId)
bool enabled() const
\qmlproperty bool XrInputAction::enabled
Hand hand() const
\qmlproperty enumeration QtQuick3D.Xr::XrInputAction::hand
void setActionName(const QString &newActionName)
QString actionName() const
\qmlproperty string XrInputAction::actionName
float value() const
\qmlproperty float XrInputAction::value
void setEnabled(bool newEnabled)
void setValue(float newValue)
\qmltype XrInputAction \inherits QtObject \inqmlmodule QtQuick3D.Xr
void init(XrInstance instance, XrSession session)
XrHandJointVelocityEXT jointVelocities[2][XR_HAND_JOINT_COUNT_EXT]
bool isPoseInUse(Hand hand, HandPoseSpace poseSpace)
void updatePoses(XrTime predictedDisplayTime, XrSpace appSpace)
PFN_xrDestroyHandTrackerEXT xrDestroyHandTrackerEXT_
void setPosePositionAndRotation(Hand hand, HandPoseSpace poseSpace, const QVector3D &position, const QQuaternion &rotation)
QQuick3DXrHandInput * rightHandInput() const
static QQuick3DXrInputManagerPrivate * get(QQuick3DXrInputManager *inputManager)
void updateHandtracking(XrTime predictedDisplayTime, XrSpace appSpace, bool aimExtensionEnabled)
QQuick3DXrInputManagerPrivate(QQuick3DXrInputManager &manager)
void setupHandModel(QQuick3DXrHandModel *model)
void registerController(QQuick3DXrController *controller)
PFN_xrCreateHandTrackerEXT xrCreateHandTrackerEXT_
QQuick3DXrHandInput * leftHandInput() const
XrHandJointLocationEXT jointLocations[2][XR_HAND_JOINT_COUNT_EXT]
void unregisterController(QQuick3DXrController *controller)
XrSpace handSpace(Hand hand, HandPoseSpace poseSpace)
PFN_xrLocateHandJointsEXT xrLocateHandJointsEXT_
void registerController(QQuick3DXrController *controller)
void unregisterController(QQuick3DXrController *controller)
QQuick3DXrHandInput * leftHandInput() const
QQuick3DXrHandInput * rightHandInput() const
static QQuick3DXrInputManager * instance()
Combined button and popup list for selecting options.
static QMatrix4x4 transformMatrix(const QVector3D &position, const QQuaternion &rotation)