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
qsphereshape_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef SPHERESHAPE_H
6#define SPHERESHAPE_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQuick3DPhysics/private/qabstractcollisionshape_p.h>
20#include <QtQml/QQmlEngine>
21
22namespace physx {
23class PxSphereGeometry;
24};
25
27
28class Q_QUICK3DPHYSICS_EXPORT QSphereShape : public QAbstractCollisionShape
29{
30 Q_OBJECT
31 Q_PROPERTY(float diameter READ diameter WRITE setDiameter NOTIFY diameterChanged)
32 QML_NAMED_ELEMENT(SphereShape)
33public:
34 QSphereShape();
35 ~QSphereShape();
36
37 float diameter() const;
38
39 physx::PxGeometry *getPhysXGeometry() override;
40 bool isStaticShape() const override { return false; }
41
42public Q_SLOTS:
43 void setDiameter(float diameter);
44
45Q_SIGNALS:
46 void diameterChanged(float diameter);
47
48private:
49 void updatePhysXGeometry();
50 physx::PxSphereGeometry *m_physXGeometry = nullptr;
51 float m_diameter = 100.0f;
52};
53
55
56#endif // SPHERESHAPE_H
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
static QWorldManager worldManager
static void collectPhysicsNodes(QQuick3DObject *node, QList< QAbstractPhysicsNode * > &nodes)
static const QString qtPhysicsTimingsFile
#define QT_BEGIN_NAMESPACE
#define QT_END_NAMESPACE
QVector< QAbstractPhysicsNode * > orphanNodes
QVector< QPhysicsWorld * > worlds