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
qboxshape_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 BOXSHAPE_H
6#define BOXSHAPE_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 <QtQuick3DPhysics/private/qabstractcollisionshape_p.h>
21#include <QtCore/QObject>
22#include <QtGui/QVector3D>
23#include <QtQml/QQmlEngine>
24
25namespace physx {
26class PxBoxGeometry;
27}
28
30
31class Q_QUICK3DPHYSICS_EXPORT QBoxShape : public QAbstractCollisionShape
32{
33 Q_OBJECT
34 Q_PROPERTY(QVector3D extents READ extents WRITE setExtents NOTIFY extentsChanged)
35 QML_NAMED_ELEMENT(BoxShape)
36public:
37 QBoxShape();
38 ~QBoxShape();
39
40 QVector3D extents() const;
41
42 physx::PxGeometry *getPhysXGeometry() override;
43 bool isStaticShape() const override { return false; }
44
45public slots:
46 void setExtents(QVector3D extents);
47
48signals:
49 void extentsChanged(QVector3D extents);
50
51private:
52 void updatePhysXGeometry();
53
54 physx::PxBoxGeometry *m_physXGeometry = nullptr;
55 QVector3D m_extents = QVector3D(100, 100, 100);
56};
57
58QT_END_NAMESPACE
59
60#endif // BOXSHAPE_H
Combined button and popup list for selecting options.