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
qabstractcollisionshape_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 ABSTRACTCOLLISIONSHAPE_H
6#define ABSTRACTCOLLISIONSHAPE_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/qtquick3dphysicsglobal.h>
20#include <QtQuick3D/private/qquick3dnode_p.h>
21#include <QtQml/QQmlEngine>
22
23namespace physx {
24class PxGeometry;
25}
26
28
30{
31 Q_OBJECT
32 Q_PROPERTY(bool enableDebugDraw READ enableDebugDraw WRITE setEnableDebugDraw NOTIFY
33 enableDebugDrawChanged)
34 QML_NAMED_ELEMENT(CollisionShape)
35 QML_UNCREATABLE("abstract interface")
36public:
37 explicit QAbstractCollisionShape(QQuick3DNode *parent = nullptr);
38 virtual ~QAbstractCollisionShape();
40 virtual physx::PxGeometry *getPhysXGeometry() = 0;
41 bool enableDebugDraw() const;
43 virtual bool isStaticShape() const = 0;
44
45public slots:
46 void setEnableDebugDraw(bool enableDebugDraw);
47
48signals:
49 void enableDebugDrawChanged(bool enableDebugDraw);
50 void needsRebuild(QObject *);
51
52protected:
53 bool m_scaleDirty = true;
54 QVector3D m_prevScale;
55
56private slots:
57 void handleScaleChange();
58
59private:
60 bool m_enableDebugDraw = false;
61};
62
63QT_END_NAMESPACE
64
65#endif // ABSTRACTCOLLISIONSHAPE_H
Combined button and popup list for selecting options.