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
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
4#ifndef BOXSHAPE_H
5#define BOXSHAPE_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 <QtCore/QObject>
21#include <QtGui/QVector3D>
22#include <QtQml/QQmlEngine>
23
24namespace physx {
25class PxBoxGeometry;
26}
27
29
31{
33 Q_PROPERTY(QVector3D extents READ extents WRITE setExtents NOTIFY extentsChanged)
34 QML_NAMED_ELEMENT(BoxShape)
35public:
37 ~QBoxShape();
38
39 QVector3D extents() const;
40
41 physx::PxGeometry *getPhysXGeometry() override;
42 bool isStaticShape() const override { return false; }
43
44public slots:
45 void setExtents(QVector3D extents);
46
49
50private:
51 void updatePhysXGeometry();
52
53 physx::PxBoxGeometry *m_physXGeometry = nullptr;
54 QVector3D m_extents = QVector3D(100, 100, 100);
55};
56
58
59#endif // BOXSHAPE_H
virtual physx::PxGeometry * getPhysXGeometry()=0
QBoxShape()
\qmltype BoxShape \inherits CollisionShape \inqmlmodule QtQuick3D.Physics
void extentsChanged(QVector3D extents)
bool isStaticShape() const override
Definition qboxshape_p.h:42
The QVector3D class represents a vector or vertex in 3D space.
Definition qvectornd.h:171
Combined button and popup list for selecting options.
#define QML_NAMED_ELEMENT(NAME)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define slots
#define signals
#define Q_QUICK3DPHYSICS_EXPORT