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
qrevolutejoint_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef REVOLUTEJOINT_H
5#define REVOLUTEJOINT_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 "joints/qjoint_p.h"
19
20#include <QtQuick3DPhysics/qtquick3dphysicsglobal.h>
21#include <qobjectdefs.h>
22#include <qqmlintegration.h>
23#include <qtmetamacros.h>
24#include <QtQml/QQmlEngine>
25
26#include <QString>
27
29
30class Q_QUICK3DPHYSICS_EXPORT QRevoluteJoint : public QPhysicsJoint
31{
33 Q_PROPERTY(float angularLimitLower READ angularLimitLower WRITE setAngularLimitLower NOTIFY
34 angularLimitLowerChanged FINAL REVISION(6, 12))
35 Q_PROPERTY(float angularLimitUpper READ angularLimitUpper WRITE setAngularLimitUpper NOTIFY
36 angularLimitUpperChanged FINAL REVISION(6, 12))
37 Q_PROPERTY(bool enableAngularLimit READ enableAngularLimit WRITE setEnableAngularLimit NOTIFY
38 enableAngularLimitChanged FINAL REVISION(6, 12))
39 QML_NAMED_ELEMENT(RevoluteJoint)
41public:
42 Q_REVISION(6, 12) float angularLimitLower() const;
43 Q_REVISION(6, 12) void setAngularLimitLower(float newAngularLimitLower);
44 Q_REVISION(6, 12) float angularLimitUpper() const;
45 Q_REVISION(6, 12) void setAngularLimitUpper(float newAngularLimitUpper);
46 Q_REVISION(6, 12) bool enableAngularLimit() const;
47 Q_REVISION(6, 12) void setEnableAngularLimit(bool newEnableAngularLimit);
50 Q_REVISION(6, 12) void angularLimitLowerChanged();
51 Q_REVISION(6, 12) void angularLimitUpperChanged();
52 Q_REVISION(6, 12) void enableAngularLimitChanged();
53
54protected:
55 physx::PxJoint *createPhysxJoint(physx::PxRigidActor *actorA, physx::PxRigidActor *actorB,
56 const physx::PxTransform &trfA,
57 const physx::PxTransform &trfB) final;
58 void setJointProperties() final;
59
60private:
61 float m_angularLimitLower = 0.f;
62 float m_angularLimitUpper = 0.f;
63 bool m_enableAngularLimit = 0.f;
64};
65
66QT_END_NAMESPACE
67
68#endif // REVOLUTEJOINT_H
Combined button and popup list for selecting options.
#define QML_NAMED_ELEMENT(NAME)
#define QT_BEGIN_NAMESPACE
#define QT_END_NAMESPACE
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_REVISION(...)
#define signals
#define emit