29#ifndef GU_MESH_FACTORY_H
30#define GU_MESH_FACTORY_H
32#include "foundation/PxIO.h"
33#include "foundation/PxHashSet.h"
34#include "foundation/PxUserAllocated.h"
35#include "geometry/PxTriangleMesh.h"
36#include "geometry/PxTetrahedronMesh.h"
37#include "geometry/PxConvexMesh.h"
38#include "geometry/PxHeightField.h"
39#include "geometry/PxBVH.h"
40#include "PxPhysXConfig.h"
42#include "foundation/PxMutex.h"
43#include "foundation/PxArray.h"
47#include "foundation/PxFoundation.h"
56 class TriangleMeshData;
58 class SoftBodyMeshData;
59 class TetrahedronMesh;
60 class TetrahedronMeshData;
62 struct ConvexHullInitData;
70 virtual void onMeshFactoryBufferRelease(
const PxBase*
object, PxType type) = 0;
71#if PX_SUPPORT_OMNI_PVD
72 virtual void onObjectAdd(
const PxBase*) {}
73 virtual void onObjectRemove(
const PxBase*) {}
79 #pragma warning( disable : 4251 )
98 PxU32 getNbTriangleMeshes()
const;
99 PxU32 getTriangleMeshes(
PxTriangleMesh** userBuffer, PxU32 bufferSize, PxU32 startIndex)
const;
106 PxU32 getNbTetrahedronMeshes()
const;
107 PxU32 getTetrahedronMeshes(
PxTetrahedronMesh** userBuffer, PxU32 bufferSize, PxU32 startIndex)
const;
114 PxU32 getNbSoftBodyMeshes()
const;
115 PxU32 getSoftBodyMeshes(
PxSoftBodyMesh** userBuffer, PxU32 bufferSize, PxU32 startIndex)
const;
122 PxU32 getNbConvexMeshes()
const;
123 PxU32 getConvexMeshes(
PxConvexMesh** userBuffer, PxU32 bufferSize, PxU32 startIndex)
const;
130 PxU32 getNbHeightFields()
const;
131 PxU32 getHeightFields(
PxHeightField** userBuffer, PxU32 bufferSize, PxU32 startIndex)
const;
134 void addBVH(
Gu::BVH* np,
bool lock=
true);
136 PxBVH* createBVH(
void* bvhData);
137 bool removeBVH(
PxBVH&);
138 PxU32 getNbBVHs()
const;
139 PxU32 getBVHs(
PxBVH** userBuffer, PxU32 bufferSize, PxU32 startIndex)
const;
143 void notifyFactoryListener(
const PxBase*, PxType typeID);
155 mutable PxMutex mTrackingMutex;
166#if PX_SUPPORT_OMNI_PVD
168 void notifyListenersAdd(
const PxBase*);
169 void notifyListenersRemove(
const PxBase*);
181 if(cndt || mf->remove(*
object))
183 const PxType type =
object->getConcreteType();
184 Cm::deletePxBase(
object);
185 mf->notifyFactoryListener(
object, type);
194 Cm::deletePxBase(
object);
Represents a BVH.
Definition GuBVH.h:93
Definition GuConvexMesh.h:94
Definition GuHeightField.h:54
Definition GuMeshFactory.h:66
Definition GuMeshFactory.h:83
Definition GuMeshData.h:616
Definition GuTetrahedronMesh.h:233
Definition GuMeshData.h:285
Definition GuTetrahedronMesh.h:120
Definition GuMeshData.h:171
Definition GuTriangleMesh.h:78
Class representing a bounding volume hierarchy.
Definition PxBVH.h:63
Base class for objects that can be members of a PxCollection.
Definition PxBase.h:73
Definition PxHashSet.h:100
A convex mesh.
Definition PxConvexMesh.h:83
A height field class.
Definition PxHeightField.h:84
A softbody mesh, containing structures to store collision shape, simulation shape and deformation sta...
Definition PxTetrahedronMesh.h:214
A tetramedron mesh, also called a 'tetrahedron soup'.
Definition PxTetrahedronMesh.h:115
A triangle mesh, also called a 'polygon soup'.
Definition PxTriangleMesh.h:118
Definition PxUserAllocated.h:43
PX_C_EXPORT PX_FOUNDATION_API physx::PxFoundation &PX_CALL_CONV PxGetFoundation()
Retrieves the Foundation SDK after it has been created.
Definition FdFoundation.cpp:279
#define PX_INLINE
Definition PxPreprocessor.h:320
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Definition GuConvexMesh.h:67
@ eINVALID_OPERATION
method was called at a time when an operation is not possible
Definition PxErrors.h:65