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
qdistancejoint_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 DISTANCEJOINT_H
5#define DISTANCEJOINT_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 QDistanceJoint : public QPhysicsJoint
31{
33 Q_PROPERTY(float minDistance READ minDistance WRITE setMinDistance NOTIFY minDistanceChanged
34 FINAL REVISION(6, 12))
35 Q_PROPERTY(float maxDistance READ maxDistance WRITE setMaxDistance NOTIFY maxDistanceChanged
36 FINAL REVISION(6, 12))
37 QML_NAMED_ELEMENT(DistanceJoint)
39public:
40 Q_REVISION(6, 12) float minDistance() const;
41 Q_REVISION(6, 12) void setMinDistance(float newMinDistance);
42 Q_REVISION(6, 12) float maxDistance() const;
43 Q_REVISION(6, 12) void setMaxDistance(float newMaxDistance);
46 Q_REVISION(6, 12) void minDistanceChanged();
47 Q_REVISION(6, 12) void maxDistanceChanged();
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_minDistance = 0.f;
57 float m_maxDistance = 0.f;
58};
59
60QT_END_NAMESPACE
61
62#endif // DISTANCEJOINT_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