1 | // Copyright (C) 2023 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #ifndef PHYSXWORLD_H |
5 | #define PHYSXWORLD_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 "qtconfigmacros.h" |
19 | |
20 | namespace physx { |
21 | class PxScene; |
22 | class PxControllerManager; |
23 | } |
24 | |
25 | QT_BEGIN_NAMESPACE |
26 | |
27 | class SimulationEventCallback; |
28 | class QPhysicsWorld; |
29 | class QVector3D; |
30 | |
31 | class QPhysXWorld |
32 | { |
33 | public: |
34 | void createWorld(); |
35 | void deleteWorld(); |
36 | void createScene(float typicalLength, float typicalSpeed, const QVector3D &gravity, |
37 | bool enableCCD, QPhysicsWorld *physicsWorld); |
38 | |
39 | // variables unique to each world/scene |
40 | physx::PxControllerManager *controllerManager = nullptr; |
41 | SimulationEventCallback *callback = nullptr; |
42 | physx::PxScene *scene = nullptr; |
43 | bool isRunning = false; |
44 | }; |
45 | |
46 | QT_END_NAMESPACE |
47 | |
48 | #endif |
49 | |