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
qquick3dxrabstracthapticeffect_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 QQUICK3DXRABSTRACTHAPTICACTION_H
5#define QQUICK3DXRABSTRACTHAPTICACTION_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 <QQmlEngine>
20
21QT_BEGIN_NAMESPACE
22class QQuick3DXrSimpleHapticEffect;
23
25{
26 Q_OBJECT
27 QML_NAMED_ELEMENT(XrHapticEffect)
28 QML_UNCREATABLE("XrHapticEffect is an abstract base class.")
30};
31
33{
34 Q_OBJECT
35 QML_NAMED_ELEMENT(XrSimpleHapticEffect)
37
41
42public:
43 float amplitude();
44 void setAmplitude(float newAmplitude);
45 float duration();
46 void setDuration(float newDuration);
47 float frequency();
48 void setFrequency(float newFrequency);
49
54
55private:
56 float m_amplitude = 0.5;
57 float m_duration = 30;
58 float m_frequency = 3000;
59};
60
61QT_END_NAMESPACE
62
63#endif
static void registerAction(QQuick3DXrInputAction *action)
static void handleInput(QQuick3DXrInputAction::Action id, QQuick3DXrInputAction::Controller hand, const char *shortName, float value)
static QList< QPointer< QQuick3DXrHapticFeedback > > getHapticEffects(QQuick3DXrInputAction::Controller hand)
static void registerHapticEffect(QPointer< QQuick3DXrHapticFeedback >)
static void removeHapticEffect(QQuick3DXrHapticFeedback *action)
static void removeAction(QQuick3DXrInputAction *action)
void classBegin() override
Invoked after class creation, but before any properties have been set.
void setCondition(enum Condition newCondition)
void setController(Controller newController)
enum Condition condition() const
\qmlproperty enumeration QtQuick3D.Xr::XrHapticFeedback::condition
void stop()
\qmlmethod void XrHapticFeedback::stop
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void setHapticEffect(QQuick3DXrAbstractHapticEffect *newHapticEffect)
QQuick3DXrAbstractHapticEffect * hapticEffect() const
\qmlproperty XrHapticEffect XrHapticFeedback::hapticEffect
Controller controller() const
\qmlproperty enumeration QtQuick3D.Xr::XrHapticFeedback::controller
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.
Controller controller() const
\qmlproperty enumeration QtQuick3D.Xr::XrInputAction::controller
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
void setActionName(const QString &newActionName)
QString actionName() const
\qmlproperty string XrInputAction::actionName
float value() const
\qmlproperty real XrInputAction::value
void setEnabled(bool newEnabled)
void setController(Controller newController)
Controller hand() const
\qmlproperty enumeration QtQuick3D.Xr::XrInputAction::hand
void setValue(float newValue)
\qmltype XrInputAction \inherits QtObject \inqmlmodule QtQuick3D.Xr
void setHand(Controller newHand)
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()
static QMatrix4x4 transformMatrix(const QVector3D &position, const QQuaternion &rotation)