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
qprismaticjoint_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 PRISMATICJOINT_H
5#define PRISMATICJOINT_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 QPrismaticJoint : public QPhysicsJoint
31{
33 Q_PROPERTY(float lowerLimit READ lowerLimit WRITE setLowerLimit NOTIFY lowerLimitChanged FINAL
34 REVISION(6, 12))
35 Q_PROPERTY(float upperLimit READ upperLimit WRITE setUpperLimit NOTIFY upperLimitChanged FINAL
36 REVISION(6, 12))
37 QML_NAMED_ELEMENT(PrismaticJoint)
39public:
40 Q_REVISION(6, 12) float lowerLimit() const;
41 Q_REVISION(6, 12) void setLowerLimit(float newLowerLimit);
42 Q_REVISION(6, 12) float upperLimit() const;
43 Q_REVISION(6, 12) void setUpperLimit(float newupperLimit);
46 Q_REVISION(6, 12) void lowerLimitChanged();
47 Q_REVISION(6, 12) void upperLimitChanged();
48
49protected:
50 physx::PxJoint *createPhysxJoint(physx::PxRigidActor *actorA, physx::PxRigidActor *actorB,
51 const physx::PxTransform &trfA,
52 const physx::PxTransform &trfB) final;
53 void setJointProperties() final;
54
55private:
56 float m_lowerLimit = 0.f;
57 float m_upperLimit = 0.f;
58};
59
60QT_END_NAMESPACE
61
62#endif // PRISMATICJOINT_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