Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QCacheUtils Namespace Reference

Enumerations

enum class  CacheGeometry { TriangleMesh , ConvexMesh , HeightField }
 

Functions

static QString getCachedFilename (const QString &filePath, CacheGeometry geom)
 
static void readCachedMesh (const QString &meshFilename, physx::PxPhysics &physics, physx::PxTriangleMesh *&triangleMesh, physx::PxConvexMesh *&convexMesh, physx::PxHeightField *&heightField, CacheGeometry geom)
 
static void writeCachedMesh (const QString &meshFilename, physx::PxDefaultMemoryOutputStream &buf, CacheGeometry geom)
 
void writeCachedTriangleMesh (const QString &filePath, physx::PxDefaultMemoryOutputStream &buf)
 
void writeCachedConvexMesh (const QString &filePath, physx::PxDefaultMemoryOutputStream &buf)
 
void writeCachedHeightField (const QString &filePath, physx::PxDefaultMemoryOutputStream &buf)
 
static void readCookedMesh (const QString &meshFilename, physx::PxPhysics &physics, physx::PxTriangleMesh *&triangleMesh, physx::PxConvexMesh *&convexMesh, physx::PxHeightField *&heightField, CacheGeometry geom)
 
physx::PxTriangleMesh * readCachedTriangleMesh (const QString &filePath, physx::PxPhysics &physics)
 
physx::PxConvexMesh * readCachedConvexMesh (const QString &filePath, physx::PxPhysics &physics)
 
physx::PxHeightField * readCachedHeightField (const QString &filePath, physx::PxPhysics &physics)
 
physx::PxTriangleMesh * readCookedTriangleMesh (const QString &filePath, physx::PxPhysics &physics)
 
physx::PxConvexMesh * readCookedConvexMesh (const QString &filePath, physx::PxPhysics &physics)
 
physx::PxHeightField * readCookedHeightField (const QString &filePath, physx::PxPhysics &physics)
 

Variables

static QString MESH_CACHE_PATH = qEnvironmentVariable("QT_PHYSICS_CACHE_PATH")
 

Enumeration Type Documentation

◆ CacheGeometry

enum class QCacheUtils::CacheGeometry
strong
Enumerator
TriangleMesh 
ConvexMesh 
HeightField 

Definition at line 15 of file qcacheutils.cpp.

Function Documentation

◆ getCachedFilename()

static QString QCacheUtils::getCachedFilename ( const QString filePath,
CacheGeometry  geom 
)
static

Definition at line 19 of file qcacheutils.cpp.

References QString::arg(), ConvexMesh, extension(), fileName, QString::fromUtf8(), HeightField, MESH_CACHE_PATH, and TriangleMesh.

Referenced by readCachedMesh(), and writeCachedMesh().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readCachedConvexMesh()

physx::PxConvexMesh * QCacheUtils::readCachedConvexMesh ( const QString filePath,
physx::PxPhysics &  physics 
)

Definition at line 230 of file qcacheutils.cpp.

References ConvexMesh, and readCachedMesh().

Referenced by QQuick3DPhysicsMesh::convexMesh().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readCachedHeightField()

physx::PxHeightField * QCacheUtils::readCachedHeightField ( const QString filePath,
physx::PxPhysics &  physics 
)

Definition at line 240 of file qcacheutils.cpp.

References HeightField, and readCachedMesh().

Referenced by QQuick3DPhysicsHeightField::heightField().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readCachedMesh()

static void QCacheUtils::readCachedMesh ( const QString meshFilename,
physx::PxPhysics &  physics,
physx::PxTriangleMesh *&  triangleMesh,
physx::PxConvexMesh *&  convexMesh,
physx::PxHeightField *&  heightField,
CacheGeometry  geom 
)
static

Definition at line 38 of file qcacheutils.cpp.

References QFileDevice::close(), ConvexMesh, getCachedFilename(), HeightField, QString::isEmpty(), QIODevice::isOpen(), QFileDevice::map(), MESH_CACHE_PATH, QFile::open(), qCDebug, qHash(), qScopeGuard(), qWarning, QIODeviceBase::ReadOnly, QFile::size(), TriangleMesh, and QFileDevice::unmap().

Referenced by readCachedConvexMesh(), readCachedHeightField(), and readCachedTriangleMesh().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readCachedTriangleMesh()

physx::PxTriangleMesh * QCacheUtils::readCachedTriangleMesh ( const QString filePath,
physx::PxPhysics &  physics 
)

Definition at line 220 of file qcacheutils.cpp.

References readCachedMesh(), and TriangleMesh.

Referenced by QQuick3DPhysicsMesh::triangleMesh().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readCookedConvexMesh()

physx::PxConvexMesh * QCacheUtils::readCookedConvexMesh ( const QString filePath,
physx::PxPhysics &  physics 
)

Definition at line 260 of file qcacheutils.cpp.

References ConvexMesh, and readCookedMesh().

Referenced by QQuick3DPhysicsMesh::convexMesh().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readCookedHeightField()

physx::PxHeightField * QCacheUtils::readCookedHeightField ( const QString filePath,
physx::PxPhysics &  physics 
)

Definition at line 270 of file qcacheutils.cpp.

References HeightField, and readCookedMesh().

Referenced by QQuick3DPhysicsHeightField::heightField().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readCookedMesh()

static void QCacheUtils::readCookedMesh ( const QString meshFilename,
physx::PxPhysics &  physics,
physx::PxTriangleMesh *&  triangleMesh,
physx::PxConvexMesh *&  convexMesh,
physx::PxHeightField *&  heightField,
CacheGeometry  geom 
)
static

Definition at line 178 of file qcacheutils.cpp.

References QFileDevice::close(), ConvexMesh, file, HeightField, QIODevice::isOpen(), QFileDevice::map(), QFile::open(), qScopeGuard(), qWarning, QIODeviceBase::ReadOnly, QFile::size(), TriangleMesh, and QFileDevice::unmap().

Referenced by readCookedConvexMesh(), readCookedHeightField(), and readCookedTriangleMesh().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readCookedTriangleMesh()

physx::PxTriangleMesh * QCacheUtils::readCookedTriangleMesh ( const QString filePath,
physx::PxPhysics &  physics 
)

Definition at line 250 of file qcacheutils.cpp.

References readCookedMesh(), and TriangleMesh.

Referenced by QQuick3DPhysicsMesh::triangleMesh().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeCachedConvexMesh()

void QCacheUtils::writeCachedConvexMesh ( const QString filePath,
physx::PxDefaultMemoryOutputStream &  buf 
)

Definition at line 168 of file qcacheutils.cpp.

References ConvexMesh, and writeCachedMesh().

Referenced by QQuick3DPhysicsMesh::convexMesh().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeCachedHeightField()

void QCacheUtils::writeCachedHeightField ( const QString filePath,
physx::PxDefaultMemoryOutputStream &  buf 
)

Definition at line 173 of file qcacheutils.cpp.

References HeightField, and writeCachedMesh().

Referenced by QQuick3DPhysicsHeightField::heightField().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeCachedMesh()

static void QCacheUtils::writeCachedMesh ( const QString meshFilename,
physx::PxDefaultMemoryOutputStream &  buf,
CacheGeometry  geom 
)
static

Definition at line 117 of file qcacheutils.cpp.

References QFileDevice::close(), QFile::fileName(), getCachedFilename(), QString::isEmpty(), QIODevice::isOpen(), QFileDevice::map(), MESH_CACHE_PATH, QFile::open(), qCDebug, qCWarning, qHash(), qScopeGuard(), qWarning, QIODeviceBase::ReadOnly, QFile::size(), QFileDevice::unmap(), QIODevice::write(), and QIODeviceBase::WriteOnly.

Referenced by writeCachedConvexMesh(), writeCachedHeightField(), and writeCachedTriangleMesh().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeCachedTriangleMesh()

void QCacheUtils::writeCachedTriangleMesh ( const QString filePath,
physx::PxDefaultMemoryOutputStream &  buf 
)

Definition at line 163 of file qcacheutils.cpp.

References TriangleMesh, and writeCachedMesh().

Referenced by QQuick3DPhysicsMesh::triangleMesh().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ MESH_CACHE_PATH

QString QCacheUtils::MESH_CACHE_PATH = qEnvironmentVariable("QT_PHYSICS_CACHE_PATH")
static

Definition at line 17 of file qcacheutils.cpp.

Referenced by getCachedFilename(), readCachedMesh(), and writeCachedMesh().