1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef STATICPHYSXOBJECTS_H
5#define STATICPHYSXOBJECTS_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#include "extensions/PxDefaultAllocator.h"
21#include "extensions/PxDefaultErrorCallback.h"
22
23namespace physx {
24class PxPvdTransport;
25class PxPvd;
26class PxFoundation;
27class PxDefaultCpuDispatcher;
28class PxCooking;
29}
30
31QT_BEGIN_NAMESPACE
32
33struct StaticPhysXObjects
34{
35 physx::PxDefaultErrorCallback defaultErrorCallback;
36 physx::PxDefaultAllocator defaultAllocatorCallback;
37 physx::PxFoundation *foundation = nullptr;
38 physx::PxPvd *pvd = nullptr;
39 physx::PxPvdTransport *transport = nullptr;
40 physx::PxPhysics *physics = nullptr;
41 physx::PxDefaultCpuDispatcher *dispatcher = nullptr;
42 physx::PxCooking *cooking = nullptr;
43
44 unsigned int foundationRefCount = 0;
45 bool foundationCreated = false;
46 bool physicsCreated = false;
47
48 static StaticPhysXObjects &getReference();
49};
50
51QT_END_NAMESPACE
52
53#endif
54

source code of qtquick3dphysics/src/quick3dphysics/qstaticphysxobjects_p.h