36#include "PxPhysXConfig.h"
37#include "PxDeletionListener.h"
38#include "foundation/PxTransform.h"
40#include "PxAggregate.h"
42#include "PxParticleSystem.h"
43#include "foundation/PxPreprocessor.h"
44#if PX_ENABLE_FEATURES_UNDER_CONSTRUCTION
45#include "PxFEMCloth.h"
46#include "PxHairSystem.h"
56class PxTolerancesScale;
59class PxInsertionCallback;
62class PxConstraintConnector;
63struct PxConstraintShaderTable;
68class PxPruningStructure;
399 virtual PxU32
getBVHs(
PxBVH** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0)
const = 0;
406 return getBVHs(userBuffer, bufferSize, startIndex);
450 virtual PxU32
getScenes(
PxScene** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0)
const = 0;
514 bool isExclusive =
false,
518 return createShape(geometry, &materialPtr, 1, isExclusive, shapeFlags);
538 bool isExclusive =
false,
542 return createShape(geometry, &materialPtr, 1, isExclusive, shapeFlags);
545#if PX_ENABLE_FEATURES_UNDER_CONSTRUCTION
563 bool isExclusive =
false,
567 return createShape(geometry, &materialPtr, 1, isExclusive, shapeFlags);
591 bool isExclusive =
false,
597 bool isExclusive =
false,
603 bool isExclusive =
false,
629 virtual PxU32
getShapes(
PxShape** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0)
const = 0;
673 virtual PxFEMCloth*
createFEMCloth(PxCudaContextManager& cudaContextManager) = 0;
756 virtual PxBuffer*
createBuffer(PxU64 byteSize, PxBufferType::Enum bufferType, PxCudaContextManager* cudaContextManager) = 0;
950 virtual PxPBDMaterial*
createPBDMaterial(PxReal friction, PxReal damping, PxReal adhesion, PxReal viscosity, PxReal vorticityConfinement, PxReal surfaceTension, PxReal cohesion, PxReal lift, PxReal drag, PxReal cflCoefficient = 1.f, PxReal gravityScale = 1.f) = 0;
1040 virtual PxMPMMaterial*
createMPMMaterial(PxReal friction, PxReal damping, PxReal adhesion,
bool isPlastic, PxReal youngsModulus, PxReal poissons, PxReal hardening, PxReal criticalCompression, PxReal criticalStretch, PxReal tensileDamageSensitivity, PxReal compressiveDamageSensitivity, PxReal attractiveForceResidual, PxReal gravityScale = 1.0f) = 0;
1250 bool trackOutstandingAllocations =
false,
1284 bool trackOutstandingAllocations =
false,
1307#pragma clang diagnostic push
1308#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
1314#pragma clang diagnostic pop
Class to aggregate actors into a single broad-phase entry.
Definition PxAggregate.h:98
A tree structure of bodies connected by joints that is treated as a unit by the dynamics solver....
Definition PxArticulationReducedCoordinate.h:448
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
Buffer for delayed bulk read and write operations supporting host and GPU device memory spaces.
Definition PxBuffer.h:66
This class connects a custom constraint to the SDK.
Definition PxConstraintDesc.h:354
A plugin class for implementing constraints.
Definition PxConstraint.h:100
A convex mesh.
Definition PxConvexMesh.h:83
Definition PxPBDMaterial.h:215
interface to get notification on object deletion
Definition PxDeletionListener.h:72
Material class to represent a set of FEM material properties.
Definition PxFEMClothMaterial.h:48
Material class to represent a set of softbody FEM material properties.
Definition PxFEMSoftBodyMaterial.h:49
Material class to represent a set of FLIP particle material properties.
Definition PxFLIPMaterial.h:49
Foundation SDK singleton class.
Definition PxFoundation.h:57
A geometry object.
Definition PxGeometry.h:79
A height field class.
Definition PxHeightField.h:84
Callback interface that permits TriangleMesh, Heightfield, ConvexMesh or BVH to be used directly with...
Definition PxInsertionCallback.h:57
Material class to represent a set of MPM particle material properties.
Definition PxMPMMaterial.h:94
Material class to represent a set of surface properties.
Definition PxMaterial.h:149
Definition PxOmniPvd.h:45
Material class to represent a set of PBD particle material properties.
Definition PxPBDMaterial.h:49
A particle system that uses the position based dynamics(PBD) solver.
Definition PxPBDParticleSystem.h:57
A particle buffer used to simulate diffuse particles.
Definition PxParticleBuffer.h:283
The shared base class for all particle buffers, can be instantiated directly to simulate granular and...
Definition PxParticleBuffer.h:81
A particle buffer used to simulate particle cloth.
Definition PxParticleBuffer.h:429
A particle buffer used to simulate rigid bodies using shape matching with particles.
Definition PxParticleBuffer.h:491
Abstract singleton factory class used for instancing objects in the Physics SDK.
Definition PxPhysics.h:91
virtual PxSoftBodyMesh * createSoftBodyMesh(PxInputStream &stream)=0
Creates a softbody mesh object.
virtual PxU32 getMaterials(PxMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of rigid body material pointers to a user buffer.
virtual PxU32 getNbFEMClothMaterials() const =0
Return the number of FEM cloth materials that currently exist.
virtual PxRigidStatic * createRigidStatic(const PxTransform &pose)=0
Creates a static rigid actor with the specified pose and all other fields initialized to their defaul...
virtual PxFLIPParticleSystem * createFLIPParticleSystem(PxCudaContextManager &cudaContextManager)=0
Creates a particle system with a fluid-implicit particle solver (FLIP).
virtual PxTetrahedronMesh * createTetrahedronMesh(PxInputStream &stream)=0
Creates a tetrahedron mesh object.
virtual void registerDeletionListenerObjects(PxDeletionListener &observer, const PxBase *const *observables, PxU32 observableCount)=0
Register specific objects for deletion events.
virtual void release()=0
Destroys the instance it is called on.
virtual PxConstraint * createConstraint(PxRigidActor *actor0, PxRigidActor *actor1, PxConstraintConnector &connector, const PxConstraintShaderTable &shaders, PxU32 dataSize)=0
Creates a constraint shader.
PX_DEPRECATED PX_FORCE_INLINE PxU32 getBVHStructures(PxBVHStructure **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const
Definition PxPhysics.h:404
virtual PxBuffer * createBuffer(PxU64 byteSize, PxBufferType::Enum bufferType, PxCudaContextManager *cudaContextManager)=0
Create a buffer for reading and writing data across host and device memory spaces.
virtual PxCustomParticleSystem * createCustomParticleSystem(PxCudaContextManager &cudaContextManager, PxU32 maxNeighborhood)=0
Creates a customizable particle system to simulate effects that are not supported by PhysX natively (...
virtual PxU32 getMPMMaterials(PxMPMMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of MPM material pointers to a user buffer.
virtual PxHairSystem * createHairSystem(PxCudaContextManager &cudaContextManager)=0
Creates a hair system with all fields initialized to their default values.
virtual PxFEMCloth * createFEMCloth(PxCudaContextManager &cudaContextManager)=0
Creates a FEM-based cloth with all fields initialized to their default values.
virtual PxU32 getNbHeightFields() const =0
Return the number of heightfields that currently exist.
virtual PxU32 getNbFEMSoftBodyMaterials() const =0
Return the number of FEM soft body materials that currently exist.
PX_DEPRECATED PX_FORCE_INLINE PxU32 getNbBVHStructures() const
Definition PxPhysics.h:380
virtual PxHeightField * createHeightField(PxInputStream &stream)=0
Creates a heightfield object from previously cooked stream.
virtual PxU32 getTriangleMeshes(PxTriangleMesh **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of triangle mesh pointers to a user buffer.
virtual PxU32 getFEMSoftBodyMaterials(PxFEMSoftBodyMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of FEM soft body material pointers to a user buffer.
virtual PxScene * createScene(const PxSceneDesc &sceneDesc)=0
Creates a scene.
virtual PxFEMSoftBodyMaterial * createFEMSoftBodyMaterial(PxReal youngs, PxReal poissons, PxReal dynamicFriction)=0
Creates a new FEM soft body material with certain default properties.
virtual PxU32 getNbPBDMaterials() const =0
Return the number of PBD materials that currently exist.
virtual PxAggregate * createAggregate(PxU32 maxActor, PxU32 maxShape, PxAggregateFilterHint filterHint)=0
Creates an aggregate with the specified maximum size and filtering hint.
virtual void unregisterDeletionListener(PxDeletionListener &observer)=0
Unregister a deletion listener.
virtual PxConvexMesh * createConvexMesh(PxInputStream &stream)=0
Creates a convex mesh object.
virtual PxBVH * createBVH(PxInputStream &stream)=0
Creates a bounding volume hierarchy.
virtual PxMPMMaterial * createMPMMaterial(PxReal friction, PxReal damping, PxReal adhesion, bool isPlastic, PxReal youngsModulus, PxReal poissons, PxReal hardening, PxReal criticalCompression, PxReal criticalStretch, PxReal tensileDamageSensitivity, PxReal compressiveDamageSensitivity, PxReal attractiveForceResidual, PxReal gravityScale=1.0f)=0
Creates a new MPM material with certain default properties.
PX_FORCE_INLINE PxShape * createShape(const PxGeometry &geometry, const PxMaterial &material, bool isExclusive=false, PxShapeFlags shapeFlags=PxShapeFlag::eVISUALIZATION|PxShapeFlag::eSCENE_QUERY_SHAPE|PxShapeFlag::eSIMULATION_SHAPE)
Creates a shape which may be attached to multiple actors.
Definition PxPhysics.h:512
virtual void registerDeletionListener(PxDeletionListener &observer, const PxDeletionEventFlags &deletionEvents, bool restrictedObjectSet=false)=0
Register a deletion listener. Listeners will be called whenever an object is deleted.
virtual PxU32 getBVHs(PxBVH **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of bounding volume hierarchy pointers to a user buffer.
virtual PxParticleRigidBuffer * createParticleRigidBuffer(PxU32 maxParticles, PxU32 maxNumVolumes, PxU32 maxNumRigids, PxCudaContextManager *cudaContextManager)=0
Create a particle buffer to simulate rigid bodies using shape matching with particles.
virtual PxU32 getNbCustomMaterials() const =0
Return the number of custom materials that currently exist.
PX_FORCE_INLINE PX_DEPRECATED PxAggregate * createAggregate(PxU32 maxActor, PxAggregateFilterHint filterHint)
Creates an aggregate with the specified maximum size and filtering hint.
Definition PxPhysics.h:170
PX_FORCE_INLINE PxShape * createShape(const PxGeometry &geometry, const PxFEMSoftBodyMaterial &material, bool isExclusive=false, PxShapeFlags shapeFlags=PxShapeFlag::eVISUALIZATION|PxShapeFlag::eSCENE_QUERY_SHAPE|PxShapeFlag::eSIMULATION_SHAPE)
Creates a shape which may be attached to one or more softbody actors.
Definition PxPhysics.h:536
PX_DEPRECATED PX_FORCE_INLINE PxBVH * createBVHStructure(PxInputStream &stream)
Definition PxPhysics.h:363
virtual PxSoftBody * createSoftBody(PxCudaContextManager &cudaContextManager)=0
Creates a FEM-based soft body with all fields initialized to their default values.
virtual PxU32 getFEMClothMaterials(PxFEMClothMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of FEM cloth material pointers to a user buffer.
virtual PxU32 getNbTetrahedronMeshes() const =0
Return the number of tetrahedron meshes that currently exist.
virtual PxTriangleMesh * createTriangleMesh(PxInputStream &stream)=0
Creates a triangle mesh object.
virtual PxParticleBuffer * createParticleBuffer(PxU32 maxParticles, PxU32 maxVolumes, PxCudaContextManager *cudaContextManager)=0
Create particle buffer to simulate fluid/granular material.
virtual PxU32 getNbTriangleMeshes() const =0
Return the number of triangle meshes that currently exist.
virtual PxShape * createShape(const PxGeometry &geometry, PxMaterial *const *materials, PxU16 materialCount, bool isExclusive=false, PxShapeFlags shapeFlags=PxShapeFlag::eVISUALIZATION|PxShapeFlag::eSCENE_QUERY_SHAPE|PxShapeFlag::eSIMULATION_SHAPE)=0
Creates a shape which may be attached to multiple actors.
virtual const PxTolerancesScale & getTolerancesScale() const =0
Returns the simulation tolerance parameters.
virtual PxU32 getTetrahedronMeshes(PxTetrahedronMesh **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of tetrahedron mesh pointers to a user buffer.
virtual PxMPMParticleSystem * createMPMParticleSystem(PxCudaContextManager &cudaContextManager)=0
Creates a particle system with a material-point-method solver (MPM).
virtual PxCustomMaterial * createCustomMaterial(void *gpuBuffer)=0
Creates a new material for custom particle systems.
virtual PxU32 getFLIPMaterials(PxFLIPMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of FLIP material pointers to a user buffer.
virtual PxU32 getNbShapes() const =0
Return the number of shapes that currently exist.
virtual PxOmniPvd * getOmniPvd()=0
Retrieves the PxOmniPvd instance if there is one registered with PxPhysics.
virtual PxPBDMaterial * createPBDMaterial(PxReal friction, PxReal damping, PxReal adhesion, PxReal viscosity, PxReal vorticityConfinement, PxReal surfaceTension, PxReal cohesion, PxReal lift, PxReal drag, PxReal cflCoefficient=1.f, PxReal gravityScale=1.f)=0
Creates a new PBD material with certain default properties.
virtual PxPruningStructure * createPruningStructure(PxRigidActor *const *actors, PxU32 nbActors)=0
Creates a pruning structure from actors.
virtual PxU32 getHeightFields(PxHeightField **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of heightfield pointers to a user buffer.
virtual PxFLIPMaterial * createFLIPMaterial(PxReal friction, PxReal damping, PxReal adhesion, PxReal viscosity, PxReal gravityScale=1.f)=0
Creates a new FLIP material with certain default properties.
virtual PxFoundation & getFoundation()=0
Retrieves the Foundation instance.
virtual PxParticleClothBuffer * createParticleClothBuffer(PxU32 maxParticles, PxU32 maxNumVolumes, PxU32 maxNumCloths, PxU32 maxNumTriangles, PxU32 maxNumSprings, PxCudaContextManager *cudaContextManager)=0
Create a particle buffer to simulate particle cloth.
virtual PxU32 getPBDMaterials(PxPBDMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of PBD material pointers to a user buffer.
virtual PxU32 getShapes(PxShape **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of shape pointers to a user buffer.
virtual PxU32 getCustomMaterials(PxCustomMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of custom material pointers to a user buffer.
virtual PxFEMClothMaterial * createFEMClothMaterial(PxReal youngs, PxReal poissons, PxReal dynamicFriction)=0
Creates a new FEM cloth material with certain default properties.
virtual PxU32 getNbFLIPMaterials() const =0
Return the number of FLIP materials that currently exist.
virtual PxU32 getScenes(PxScene **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of scene pointers to a user buffer.
virtual PxU32 getNbMPMMaterials() const =0
Return the number of MPM materials that currently exist.
virtual PxU32 getNbBVHs() const =0
Return the number of bounding volume hierarchies that currently exist.
virtual PxMaterial * createMaterial(PxReal staticFriction, PxReal dynamicFriction, PxReal restitution)=0
Creates a new rigid body material with certain default properties.
virtual PxPBDParticleSystem * createPBDParticleSystem(PxCudaContextManager &cudaContextManager, PxU32 maxNeighborhood=96)=0
Creates a particle system with a position-based dynamics (PBD) solver.
virtual PxArticulationReducedCoordinate * createArticulationReducedCoordinate()=0
Creates a reduced-coordinate articulation with all fields initialized to their default values.
virtual PxU32 getNbMaterials() const =0
Return the number of rigid body materials that currently exist.
virtual PxU32 getNbScenes() const =0
Gets number of created scenes.
virtual PxInsertionCallback & getPhysicsInsertionCallback()=0
Gets PxPhysics object insertion interface.
virtual PxParticleAndDiffuseBuffer * createParticleAndDiffuseBuffer(PxU32 maxParticles, PxU32 maxVolumes, PxU32 maxDiffuseParticles, PxCudaContextManager *cudaContextManager)=0
Create a particle buffer for fluid dynamics with diffuse particles. Diffuse particles are used to sim...
virtual PxU32 getConvexMeshes(PxConvexMesh **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of convex mesh pointers to a user buffer.
virtual void unregisterDeletionListenerObjects(PxDeletionListener &observer, const PxBase *const *observables, PxU32 observableCount)=0
Unregister specific objects for deletion events.
virtual PxU32 getNbConvexMeshes() const =0
Return the number of convex meshes that currently exist.
virtual PxRigidDynamic * createRigidDynamic(const PxTransform &pose)=0
Creates a dynamic rigid actor with the specified pose and all other fields initialized to their defau...
A precomputed pruning structure to accelerate scene queries against newly added actors.
Definition PxPruningStructure.h:61
PxPvd is the top-level class for the PVD framework, and the main customer interface for PVD configura...
Definition PxPvd.h:114
PxRigidActor represents a base class shared between dynamic and static rigid bodies in the physics SD...
Definition PxRigidActor.h:53
PxRigidDynamic represents a dynamic rigid simulation object in the physics SDK.
Definition PxRigidDynamic.h:82
PxRigidStatic represents a static rigid body simulation object in the physics SDK.
Definition PxRigidStatic.h:58
Descriptor class for scenes. See #PxScene.
Definition PxSceneDesc.h:426
A scene is a collection of bodies and constraints which can interact.
Definition PxScene.h:178
Abstract class for collision shapes.
Definition PxShape.h:146
A softbody mesh, containing structures to store collision shape, simulation shape and deformation sta...
Definition PxTetrahedronMesh.h:214
Represents a FEM softbody including everything to calculate its definition like geometry and material...
Definition PxSoftBody.h:104
A tetramedron mesh, also called a 'tetrahedron soup'.
Definition PxTetrahedronMesh.h:115
Class to define the scale at which simulation runs. Most simulation tolerances are calculated in term...
Definition PxTolerancesScale.h:53
A triangle mesh, also called a 'polygon soup'.
Definition PxTriangleMesh.h:118
#define PX_CALL_CONV
Definition PxPreprocessor.h:299
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
#define PX_INLINE
Definition PxPreprocessor.h:320
#define PX_DEPRECATED
Definition PxPreprocessor.h:418
PX_C_EXPORT PX_PHYSX_CORE_API physx::PxPhysics &PX_CALL_CONV PxGetPhysics()
Retrieves the Physics SDK after it has been created.
Definition NpPhysics.cpp:1735
PX_DEPRECATED PX_C_EXPORT PX_PHYSX_CORE_API physx::PxPhysics *PX_CALL_CONV PxCreateBasePhysics(physx::PxU32 version, physx::PxFoundation &foundation, const physx::PxTolerancesScale &scale, bool trackOutstandingAllocations=false, physx::PxPvd *pvd=NULL, physx::PxOmniPvd *omniPvd=NULL)
Creates an instance of the physics SDK with minimal additional components registered.
Definition NpPhysics.cpp:1740
PX_DEPRECATED PX_C_EXPORT PX_PHYSX_CORE_API void PX_CALL_CONV PxRegisterHeightFields(physx::PxPhysics &physics)
Enables the usage of the heightfield feature.
Definition NpPhysics.cpp:1759
PX_DEPRECATED PX_C_EXPORT PX_PHYSX_CORE_API void PX_CALL_CONV PxRegisterArticulationsReducedCoordinate(physx::PxPhysics &physics)
Enables the usage of the reduced coordinate articulations feature. This function is called automatica...
Definition NpPhysics.cpp:1752
PX_INLINE physx::PxPhysics * PxCreatePhysics(physx::PxU32 version, physx::PxFoundation &foundation, const physx::PxTolerancesScale &scale, bool trackOutstandingAllocations=false, physx::PxPvd *pvd=NULL, physx::PxOmniPvd *omniPvd=NULL)
Creates an instance of the physics SDK.
Definition PxPhysics.h:1281
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PX_DEPRECATED PxBVH PxBVHStructure
Definition PxPhysics.h:73
a table of function pointers for a constraint
Definition PxConstraint.h:87
@ eSIMULATION_SHAPE
The shape will partake in collision in the physical simulation.
Definition PxShape.h:83
@ eVISUALIZATION
Enable debug renderer for this shape.
Definition PxShape.h:117
@ eSCENE_QUERY_SHAPE
The shape will partake in scene queries (ray casts, overlap tests, sweeps, ...).
Definition PxShape.h:88