Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
4#ifndef SPHERESHAPE_H
5#define SPHERESHAPE_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 <QtQuick3DPhysics/private/qabstractcollisionshape_p.h>
19#include <QtQml/QQmlEngine>
20
21namespace physx {
22class PxSphereGeometry;
23};
24
26
28{
30 Q_PROPERTY(float diameter READ diameter WRITE setDiameter NOTIFY diameterChanged)
31 QML_NAMED_ELEMENT(SphereShape)
32public:
35
36 float diameter() const;
37
38 physx::PxGeometry *getPhysXGeometry() override;
39 bool isStaticShape() const override { return false; }
40
41public Q_SLOTS:
42 void setDiameter(float diameter);
43
45 void diameterChanged(float diameter);
46
47private:
48 void updatePhysXGeometry();
49 physx::PxSphereGeometry *m_physXGeometry = nullptr;
50 float m_diameter = 100.0f;
51};
52
54
55#endif // SPHERESHAPE_H
virtual physx::PxGeometry * getPhysXGeometry()=0
void diameterChanged(float diameter)
bool isStaticShape() const override
QSphereShape()
\qmltype SphereShape \inqmlmodule QtQuick3D.Physics \inherits CollisionShape
Combined button and popup list for selecting options.
#define QML_NAMED_ELEMENT(NAME)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
#define Q_QUICK3DPHYSICS_EXPORT