1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef CACHEUTILS_H
5#define CACHEUTILS_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 <QtCore/qtconfigmacros.h>
19#include <QtCore/QString>
20
21namespace physx {
22class PxDefaultMemoryOutputStream;
23class PxTriangleMesh;
24class PxConvexMesh;
25class PxPhysics;
26class PxHeightField;
27}
28
29QT_BEGIN_NAMESPACE
30namespace QCacheUtils {
31void writeCachedTriangleMesh(const QString &filePath, physx::PxDefaultMemoryOutputStream &buf);
32void writeCachedConvexMesh(const QString &filePath, physx::PxDefaultMemoryOutputStream &buf);
33void writeCachedHeightField(const QString &filePath, physx::PxDefaultMemoryOutputStream &buf);
34
35physx::PxTriangleMesh *readCookedTriangleMesh(const QString &filePath, physx::PxPhysics &physics);
36physx::PxConvexMesh *readCookedConvexMesh(const QString &filePath, physx::PxPhysics &physics);
37physx::PxHeightField *readCookedHeightField(const QString &filePath, physx::PxPhysics &physics);
38
39physx::PxTriangleMesh *readCachedTriangleMesh(const QString &filePath, physx::PxPhysics &physics);
40physx::PxConvexMesh *readCachedConvexMesh(const QString &filePath, physx::PxPhysics &physics);
41physx::PxHeightField *readCachedHeightField(const QString &filePath, physx::PxPhysics &physics);
42}
43QT_END_NAMESPACE
44
45#endif
46

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