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
qcapsuleshape_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 CAPSULESHAPE_H
5#define CAPSULESHAPE_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/qtquick3dphysicsglobal.h>
19#include <QtQuick3DPhysics/private/qabstractcollisionshape_p.h>
20#include <QtQml/QQmlEngine>
21
22namespace physx {
23class PxCapsuleGeometry;
24}
25
27
29{
31 QML_NAMED_ELEMENT(CapsuleShape)
32 Q_PROPERTY(float diameter READ diameter WRITE setDiameter NOTIFY diameterChanged)
33 Q_PROPERTY(float height READ height WRITE setHeight NOTIFY heightChanged)
34public:
37
38 float diameter() const;
39 void setDiameter(float newDiameter);
40
41 float height() const;
42 void setHeight(float newHeight);
43
44 physx::PxGeometry *getPhysXGeometry() override;
45 bool isStaticShape() const override { return false; }
46
50
51private:
52 void updatePhysXGeometry();
53 physx::PxCapsuleGeometry *m_physXGeometry = nullptr;
54 float m_diameter = 100.0f;
55 float m_height = 100.0f;
56};
57
59
60#endif // CAPSULESHAPE_H
void heightChanged()
void diameterChanged()
Combined button and popup list for selecting options.
GLint GLsizei GLsizei height
#define QML_NAMED_ELEMENT(NAME)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
#define Q_QUICK3DPHYSICS_EXPORT