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
20namespace physx {
21class PxScene;
22class PxControllerManager;
23}
24
25QT_BEGIN_NAMESPACE
26
27class SimulationEventCallback;
28class QPhysicsWorld;
29class QVector3D;
30
31class QPhysXWorld
32{
33public:
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
46QT_END_NAMESPACE
47
48#endif
49

source code of qtquick3dphysics/src/quick3dphysics/physxnode/qphysxworld_p.h