aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick3dphysics/physxnode/qphysxworld_p.h
blob: 1f153fd3d1aab3f49dbfda382b34a5967b7d5484 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef PHYSXWORLD_H
#define PHYSXWORLD_H

//
//  W A R N I N G
//  -------------
//
// This file is not part of the Qt API.  It exists purely as an
// implementation detail.  This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//

#include "qtconfigmacros.h"

namespace physx {
class PxScene;
class PxControllerManager;
}

QT_BEGIN_NAMESPACE

class SimulationEventCallback;
class QPhysicsWorld;
class QVector3D;

class QPhysXWorld
{
public:
    void createWorld();
    void deleteWorld();
    void createScene(float typicalLength, float typicalSpeed, const QVector3D &gravity,
                     bool enableCCD, QPhysicsWorld *physicsWorld, unsigned int numThreads);

    // variables unique to each world/scene
    physx::PxControllerManager *controllerManager = nullptr;
    SimulationEventCallback *callback = nullptr;
    physx::PxScene *scene = nullptr;
    bool isRunning = false;
};

QT_END_NAMESPACE

#endif