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
qopenxrhandinput_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QOPENXRHANDINPUT_H
5#define QOPENXRHANDINPUT_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
25
27{
33
34 QML_NAMED_ELEMENT(XrHandInput)
35 QML_UNCREATABLE("Created by XrView")
36
37public:
38 enum class HandPoseSpace {
41 };
43
44
45 explicit QOpenXRHandInput(QObject *parent = nullptr);
46
47 bool isActive() const;
49 void setIsActive(bool isActive);
51 void setPoseRotation(const QQuaternion &rotation);
52
53 const QVector3D &posePosition() const;
54
55 const QQuaternion &poseRotation() const;
56
57 void setInputValue(int id, const char *shortName, float value) { emit inputValueChange(id, shortName, value); }
58
59public Q_SLOTS:
61
64
65 void inputValueChange(int id, const char *shortName, float value);
66
70
71private:
72 bool m_isActive = false;
74 QVector3D m_posePosition;
75 QQuaternion m_poseRotation;
76};
77
79
80#endif // QOPENXRHANDINPUT_H
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
HandPoseSpace poseSpace
void isActiveChanged()
void setPosePosition(const QVector3D &position)
void poseRotationChanged()
void poseSpaceChanged()
void setPoseRotation(const QQuaternion &rotation)
void inputValueChange(int id, const char *shortName, float value)
QOpenXRHandInput(QObject *parent=nullptr)
void setPoseSpace(HandPoseSpace poseSpace)
void setIsActive(bool isActive)
void posePositionChanged()
void setInputValue(int id, const char *shortName, float value)
The QQuaternion class represents a quaternion consisting of a vector and scalar.
The QVector3D class represents a vector or vertex in 3D space.
Definition qvectornd.h:171
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLbyte by
#define QML_UNCREATABLE(REASON)
#define QML_NAMED_ELEMENT(NAME)
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
#define emit