RavEngine
Loading...
Searching...
No Matches
physx::PxPhysics Class Referenceabstract

Abstract singleton factory class used for instancing objects in the Physics SDK. More...

#include <PxPhysics.h>

Inheritance diagram for physx::PxPhysics:
[legend]

Public Member Functions

Basics
virtual void release ()=0
 Destroys the instance it is called on.
 
virtual PxFoundation & getFoundation ()=0
 Retrieves the Foundation instance.
 
virtual PxOmniPvd * getOmniPvd ()=0
 Retrieves the PxOmniPvd instance if there is one registered with PxPhysics.
 
virtual PxAggregate * createAggregate (PxU32 maxActor, PxU32 maxShape, PxAggregateFilterHint filterHint)=0
 Creates an aggregate with the specified maximum size and filtering hint.
 
PX_FORCE_INLINE PX_DEPRECATED PxAggregate * createAggregate (PxU32 maxActor, PxAggregateFilterHint filterHint)
 Creates an aggregate with the specified maximum size and filtering hint.
 
virtual const PxTolerancesScale & getTolerancesScale () const =0
 Returns the simulation tolerance parameters.
 
Meshes
virtual PxTriangleMesh * createTriangleMesh (PxInputStream &stream)=0
 Creates a triangle mesh object.
 
virtual PxU32 getNbTriangleMeshes () const =0
 Return the number of triangle meshes that currently exist.
 
virtual PxU32 getTriangleMeshes (PxTriangleMesh **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Writes the array of triangle mesh pointers to a user buffer.
 
Tetrahedron Meshes
virtual PxTetrahedronMesh * createTetrahedronMesh (PxInputStream &stream)=0
 Creates a tetrahedron mesh object.
 
virtual PxSoftBodyMesh * createSoftBodyMesh (PxInputStream &stream)=0
 Creates a softbody mesh object.
 
virtual PxU32 getNbTetrahedronMeshes () const =0
 Return the number of tetrahedron meshes that currently exist.
 
virtual PxU32 getTetrahedronMeshes (PxTetrahedronMesh **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Writes the array of tetrahedron mesh pointers to a user buffer.
 
virtual PxHeightField * createHeightField (PxInputStream &stream)=0
 Creates a heightfield object from previously cooked stream.
 
virtual PxU32 getNbHeightFields () const =0
 Return the number of heightfields that currently exist.
 
virtual PxU32 getHeightFields (PxHeightField **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Writes the array of heightfield pointers to a user buffer.
 
virtual PxConvexMesh * createConvexMesh (PxInputStream &stream)=0
 Creates a convex mesh object.
 
virtual PxU32 getNbConvexMeshes () const =0
 Return the number of convex meshes that currently exist.
 
virtual PxU32 getConvexMeshes (PxConvexMesh **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Writes the array of convex mesh pointers to a user buffer.
 
virtual PxBVH * createBVH (PxInputStream &stream)=0
 Creates a bounding volume hierarchy.
 
PX_DEPRECATED PX_FORCE_INLINE PxBVH * createBVHStructure (PxInputStream &stream)
 
virtual PxU32 getNbBVHs () const =0
 Return the number of bounding volume hierarchies that currently exist.
 
PX_DEPRECATED PX_FORCE_INLINE PxU32 getNbBVHStructures () const
 
virtual PxU32 getBVHs (PxBVH **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Writes the array of bounding volume hierarchy pointers to a user buffer.
 
PX_DEPRECATED PX_FORCE_INLINE PxU32 getBVHStructures (PxBVHStructure **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const
 
Scenes
virtual PxScene * createScene (const PxSceneDesc &sceneDesc)=0
 Creates a scene.
 
virtual PxU32 getNbScenes () const =0
 Gets number of created scenes.
 
virtual PxU32 getScenes (PxScene **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Writes the array of scene pointers to a user buffer.
 
Actors
virtual PxRigidStatic * createRigidStatic (const PxTransform &pose)=0
 Creates a static rigid actor with the specified pose and all other fields initialized to their default values.
 
virtual PxRigidDynamic * createRigidDynamic (const PxTransform &pose)=0
 Creates a dynamic rigid actor with the specified pose and all other fields initialized to their default values.
 
virtual PxPruningStructure * createPruningStructure (PxRigidActor *const *actors, PxU32 nbActors)=0
 Creates a pruning structure from actors.
 
Shapes
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.
 
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.
 
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 PxShape * createShape (const PxGeometry &geometry, PxFEMSoftBodyMaterial *const *materials, PxU16 materialCount, bool isExclusive=false, PxShapeFlags shapeFlags=PxShapeFlag::eVISUALIZATION|PxShapeFlag::eSCENE_QUERY_SHAPE|PxShapeFlag::eSIMULATION_SHAPE)=0
 
virtual PxShape * createShape (const PxGeometry &geometry, PxFEMClothMaterial *const *materials, PxU16 materialCount, bool isExclusive=false, PxShapeFlags shapeFlags=PxShapeFlag::eVISUALIZATION|PxShapeFlag::eSCENE_QUERY_SHAPE|PxShapeFlag::eSIMULATION_SHAPE)=0
 
virtual PxU32 getNbShapes () const =0
 Return the number of shapes that currently exist.
 
virtual PxU32 getShapes (PxShape **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Writes the array of shape pointers to a user buffer.
 
Constraints and Articulations
virtual PxConstraint * createConstraint (PxRigidActor *actor0, PxRigidActor *actor1, PxConstraintConnector &connector, const PxConstraintShaderTable &shaders, PxU32 dataSize)=0
 Creates a constraint shader.
 
virtual PxArticulationReducedCoordinate * createArticulationReducedCoordinate ()=0
 Creates a reduced-coordinate articulation 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 PxSoftBody * createSoftBody (PxCudaContextManager &cudaContextManager)=0
 Creates a FEM-based soft body with all fields initialized to their default values.
 
virtual PxHairSystem * createHairSystem (PxCudaContextManager &cudaContextManager)=0
 Creates a hair system with all fields initialized to their default values.
 
virtual PxPBDParticleSystem * createPBDParticleSystem (PxCudaContextManager &cudaContextManager, PxU32 maxNeighborhood=96)=0
 Creates a particle system with a position-based dynamics (PBD) solver.
 
virtual PxFLIPParticleSystem * createFLIPParticleSystem (PxCudaContextManager &cudaContextManager)=0
 Creates a particle system with a fluid-implicit particle solver (FLIP).
 
virtual PxMPMParticleSystem * createMPMParticleSystem (PxCudaContextManager &cudaContextManager)=0
 Creates a particle system with a material-point-method solver (MPM).
 
virtual PxCustomParticleSystem * createCustomParticleSystem (PxCudaContextManager &cudaContextManager, PxU32 maxNeighborhood)=0
 Creates a customizable particle system to simulate effects that are not supported by PhysX natively (e.g. molecular dynamics).
 
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 PxParticleBuffer * createParticleBuffer (PxU32 maxParticles, PxU32 maxVolumes, PxCudaContextManager *cudaContextManager)=0
 Create particle buffer to simulate fluid/granular material.
 
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 simulate fluid effects such as foam, spray and bubbles.
 
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 PxParticleRigidBuffer * createParticleRigidBuffer (PxU32 maxParticles, PxU32 maxNumVolumes, PxU32 maxNumRigids, PxCudaContextManager *cudaContextManager)=0
 Create a particle buffer to simulate rigid bodies using shape matching with particles.
 
Materials
virtual PxMaterial * createMaterial (PxReal staticFriction, PxReal dynamicFriction, PxReal restitution)=0
 Creates a new rigid body material with certain default properties.
 
virtual PxU32 getNbMaterials () const =0
 Return the number of rigid body materials that currently exist.
 
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 PxFEMSoftBodyMaterial * createFEMSoftBodyMaterial (PxReal youngs, PxReal poissons, PxReal dynamicFriction)=0
 Creates a new FEM soft body material with certain default properties.
 
virtual PxU32 getNbFEMSoftBodyMaterials () const =0
 Return the number of FEM soft body materials that currently exist.
 
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 PxFEMClothMaterial * createFEMClothMaterial (PxReal youngs, PxReal poissons, PxReal dynamicFriction)=0
 Creates a new FEM cloth material with certain default properties.
 
virtual PxU32 getNbFEMClothMaterials () const =0
 Return the number of FEM cloth materials that currently exist.
 
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 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 PxU32 getNbPBDMaterials () const =0
 Return the number of PBD materials that currently exist.
 
virtual PxU32 getPBDMaterials (PxPBDMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Writes the array of PBD material 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 PxU32 getNbFLIPMaterials () const =0
 Return the number of FLIP materials that currently exist.
 
virtual PxU32 getFLIPMaterials (PxFLIPMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Writes the array of FLIP material pointers to a user buffer.
 
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.
 
virtual PxU32 getNbMPMMaterials () const =0
 Return the number of MPM materials that currently exist.
 
virtual PxU32 getMPMMaterials (PxMPMMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Writes the array of MPM material pointers to a user buffer.
 
virtual PxCustomMaterial * createCustomMaterial (void *gpuBuffer)=0
 Creates a new material for custom particle systems.
 
virtual PxU32 getNbCustomMaterials () const =0
 Return the number of custom materials that currently exist.
 
virtual PxU32 getCustomMaterials (PxCustomMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Writes the array of custom material pointers to a user buffer.
 
Deletion Listeners
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 void unregisterDeletionListener (PxDeletionListener &observer)=0
 Unregister a deletion listener.
 
virtual void registerDeletionListenerObjects (PxDeletionListener &observer, const PxBase *const *observables, PxU32 observableCount)=0
 Register specific objects for deletion events.
 
virtual void unregisterDeletionListenerObjects (PxDeletionListener &observer, const PxBase *const *observables, PxU32 observableCount)=0
 Unregister specific objects for deletion events.
 
virtual PxInsertionCallback & getPhysicsInsertionCallback ()=0
 Gets PxPhysics object insertion interface.
 

Detailed Description

Abstract singleton factory class used for instancing objects in the Physics SDK.

In addition you can use PxPhysics to set global parameters which will effect all scenes and create objects that can be shared across multiple scenes.

You can get an instance of this class by calling PxCreateBasePhysics() or PxCreatePhysics() with pre-registered modules.

See also
PxCreatePhysics() PxCreateBasePhysics() PxScene

Member Function Documentation

◆ createAggregate() [1/2]

PX_FORCE_INLINE PX_DEPRECATED PxAggregate * physx::PxPhysics::createAggregate ( PxU32  maxActor,
PxAggregateFilterHint  filterHint 
)
inline

Creates an aggregate with the specified maximum size and filtering hint.

The previous API used "bool enableSelfCollision" which should now silently evaluates to a PxAggregateType::eGENERIC aggregate with its self-collision bit.

Use PxAggregateType::eSTATIC or PxAggregateType::eKINEMATIC for aggregates that will only contain static or kinematic actors. This provides faster filtering when used in combination with PxPairFilteringMode.

Note
This variation of the method is not compatible with GPU rigid bodies.
Parameters
[in]maxActorThe maximum number of actors that may be placed in the aggregate.
[in]filterHintThe aggregate's filtering hint.
Returns
The new aggregate.
See also
PxAggregate PxAggregateFilterHint PxAggregateType PxPairFilteringMode
Deprecated:

◆ createAggregate() [2/2]

virtual PxAggregate * physx::PxPhysics::createAggregate ( PxU32  maxActor,
PxU32  maxShape,
PxAggregateFilterHint  filterHint 
)
pure virtual

Creates an aggregate with the specified maximum size and filtering hint.

The previous API used "bool enableSelfCollision" which should now silently evaluates to a PxAggregateType::eGENERIC aggregate with its self-collision bit.

Use PxAggregateType::eSTATIC or PxAggregateType::eKINEMATIC for aggregates that will only contain static or kinematic actors. This provides faster filtering when used in combination with PxPairFilteringMode.

Parameters
[in]maxActorThe maximum number of actors that may be placed in the aggregate.
[in]maxShapeThe maximum number of shapes that may be placed in the aggregate.
[in]filterHintThe aggregate's filtering hint.
Returns
The new aggregate.
See also
PxAggregate PxAggregateFilterHint PxAggregateType PxPairFilteringMode

Implemented in physx::NpPhysics.

◆ createArticulationReducedCoordinate()

virtual PxArticulationReducedCoordinate * physx::PxPhysics::createArticulationReducedCoordinate ( )
pure virtual

Creates a reduced-coordinate articulation with all fields initialized to their default values.

Returns
the new articulation
See also
PxArticulationReducedCoordinate, PxRegisterArticulationsReducedCoordinate

Implemented in physx::NpPhysics.

◆ createBuffer()

virtual PxBuffer * physx::PxPhysics::createBuffer ( PxU64  byteSize,
PxBufferType::Enum  bufferType,
PxCudaContextManager *  cudaContextManager 
)
pure virtual

Create a buffer for reading and writing data across host and device memory spaces.

Parameters
[in]byteSizeThe size of the buffer in bytes.
[in]bufferTypeThe memory space of the buffer.
[in]cudaContextManagerThe PxCudaContextManager this buffer is tied to.
Returns
PxBuffer instance.
See also
PxBuffer

Implemented in physx::NpPhysics.

◆ createBVH()

virtual PxBVH * physx::PxPhysics::createBVH ( PxInputStream &  stream)
pure virtual

Creates a bounding volume hierarchy.

Parameters
[in]streamThe stream to load the BVH from.
Returns
The new BVH.
See also
PxBVH PxInputStream

Implemented in physx::NpPhysics.

◆ createBVHStructure()

PX_DEPRECATED PX_FORCE_INLINE PxBVH * physx::PxPhysics::createBVHStructure ( PxInputStream &  stream)
inline

◆ createConstraint()

virtual PxConstraint * physx::PxPhysics::createConstraint ( PxRigidActor *  actor0,
PxRigidActor *  actor1,
PxConstraintConnector &  connector,
const PxConstraintShaderTable &  shaders,
PxU32  dataSize 
)
pure virtual

Creates a constraint shader.

Note
A constraint shader will get added automatically to the scene the two linked actors belong to. Either, but not both, of actor0 and actor1 may be NULL to denote attachment to the world.
Parameters
[in]actor0The first actor
[in]actor1The second actor
[in]connectorThe connector object, which the SDK uses to communicate with the infrastructure for the constraint
[in]shadersThe shader functions for the constraint
[in]dataSizeThe size of the data block for the shader
Returns
The new constraint shader.
See also
PxConstraint

Implemented in physx::NpPhysics.

◆ createConvexMesh()

virtual PxConvexMesh * physx::PxPhysics::createConvexMesh ( PxInputStream &  stream)
pure virtual

Creates a convex mesh object.

This can then be instanced into #PxShape objects.

Parameters
[in]streamThe stream to load the convex mesh from.
Returns
The new convex mesh.
See also
PxConvexMesh PxConvexMesh.release() PxInputStream createTriangleMesh() PxConvexMeshGeometry PxShape

Implemented in physx::NpPhysics.

◆ createCustomMaterial()

virtual PxCustomMaterial * physx::PxPhysics::createCustomMaterial ( void *  gpuBuffer)
pure virtual

Creates a new material for custom particle systems.

Warning
Feature under development, only for internal usage.
Parameters
[in]gpuBufferA pointer to a GPU buffer containing material parameters.
Returns
the new material.

Implemented in physx::NpPhysics.

◆ createCustomParticleSystem()

virtual PxCustomParticleSystem * physx::PxPhysics::createCustomParticleSystem ( PxCudaContextManager &  cudaContextManager,
PxU32  maxNeighborhood 
)
pure virtual

Creates a customizable particle system to simulate effects that are not supported by PhysX natively (e.g. molecular dynamics).

Warning
Feature under development, only for internal usage.
Parameters
[in]cudaContextManagerThe PxCudaContextManager this instance is tied to.
[in]maxNeighborhoodThe maximum number of particles considered in neighborhood-based particle interaction calculations (e.g. fluid density constraints).
Returns
the new particle system
See also
PxCustomParticleSystem

Implemented in physx::NpPhysics.

◆ createFEMCloth()

virtual PxFEMCloth * physx::PxPhysics::createFEMCloth ( PxCudaContextManager &  cudaContextManager)
pure virtual

Creates a FEM-based cloth with all fields initialized to their default values.

Warning
Feature under development, only for internal usage.
Parameters
[in]cudaContextManagerThe PxCudaContextManager this instance is tied to.
Returns
the new FEM-cloth
See also
PxFEMCloth

Implemented in physx::NpPhysics.

◆ createFEMClothMaterial()

virtual PxFEMClothMaterial * physx::PxPhysics::createFEMClothMaterial ( PxReal  youngs,
PxReal  poissons,
PxReal  dynamicFriction 
)
pure virtual

Creates a new FEM cloth material with certain default properties.

Warning
Feature under development, only for internal usage.
Returns
The new FEM material.
Parameters
[in]youngsThe young's modulus
[in]poissonsThe poissons's ratio
[in]dynamicFrictionThe dynamic friction coefficient
See also
PxFEMClothMaterial

Implemented in physx::NpPhysics.

◆ createFEMSoftBodyMaterial()

virtual PxFEMSoftBodyMaterial * physx::PxPhysics::createFEMSoftBodyMaterial ( PxReal  youngs,
PxReal  poissons,
PxReal  dynamicFriction 
)
pure virtual

Creates a new FEM soft body material with certain default properties.

Returns
The new FEM material.
Parameters
[in]youngsThe young's modulus
[in]poissonsThe poissons's ratio
[in]dynamicFrictionThe dynamic friction coefficient
See also
PxFEMSoftBodyMaterial

Implemented in physx::NpPhysics.

◆ createFLIPMaterial()

virtual PxFLIPMaterial * physx::PxPhysics::createFLIPMaterial ( PxReal  friction,
PxReal  damping,
PxReal  adhesion,
PxReal  viscosity,
PxReal  gravityScale = 1.f 
)
pure virtual

Creates a new FLIP material with certain default properties.

Warning
Feature under development, only for internal usage.
Parameters
[in]frictionThe friction parameter
[in]dampingThe velocity damping parameter
[in]adhesionThe maximum velocity magnitude of particles
[in]viscosityThe viscosity parameter
[in]gravityScaleThe gravity scale
Returns
The new FLIP material.
See also
PxFLIPMaterial

Implemented in physx::NpPhysics.

◆ createFLIPParticleSystem()

virtual PxFLIPParticleSystem * physx::PxPhysics::createFLIPParticleSystem ( PxCudaContextManager &  cudaContextManager)
pure virtual

Creates a particle system with a fluid-implicit particle solver (FLIP).

Warning
Feature under development, only for internal usage.
Parameters
[in]cudaContextManagerThe PxCudaContextManager this instance is tied to.
Returns
the new particle system
See also
PxFLIPParticleSystem

Implemented in physx::NpPhysics.

◆ createHairSystem()

virtual PxHairSystem * physx::PxPhysics::createHairSystem ( PxCudaContextManager &  cudaContextManager)
pure virtual

Creates a hair system with all fields initialized to their default values.

Warning
Feature under development, only for internal usage.
Parameters
[in]cudaContextManagerThe PxCudaContextManager this instance is tied to.
Returns
the new hair system
See also
PxHairSystem

Implemented in physx::NpPhysics.

◆ createHeightField()

virtual PxHeightField * physx::PxPhysics::createHeightField ( PxInputStream &  stream)
pure virtual

Creates a heightfield object from previously cooked stream.

This can then be instanced into #PxShape objects.

Parameters
[in]streamThe heightfield mesh stream.
Returns
The new heightfield.
See also
PxHeightField PxHeightField.release() PxInputStream PxRegisterHeightFields

Implemented in physx::NpPhysics.

◆ createMaterial()

virtual PxMaterial * physx::PxPhysics::createMaterial ( PxReal  staticFriction,
PxReal  dynamicFriction,
PxReal  restitution 
)
pure virtual

Creates a new rigid body material with certain default properties.

Returns
The new rigid body material.
Parameters
[in]staticFrictionThe coefficient of static friction
[in]dynamicFrictionThe coefficient of dynamic friction
[in]restitutionThe coefficient of restitution
See also
PxMaterial

Implemented in physx::NpPhysics.

◆ createMPMMaterial()

virtual PxMPMMaterial * physx::PxPhysics::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 
)
pure virtual

Creates a new MPM material with certain default properties.

Warning
Feature under development, only for internal usage.
Parameters
[in]frictionThe friction parameter
[in]dampingThe velocity damping parameter
[in]adhesionThe maximum velocity magnitude of particles
[in]isPlasticTrue if plastic
[in]youngsModulusThe Young's modulus
[in]poissonsThe Poissons's ratio
[in]hardeningThe hardening parameter
[in]criticalCompressionThe critical compression parameter
[in]criticalStretchThe critical stretch parameter
[in]tensileDamageSensitivityThe tensile damage sensitivity parameter
[in]compressiveDamageSensitivityThe compressive damage sensitivity parameter
[in]attractiveForceResidualThe attractive force residual parameter
[in]gravityScaleThe gravity scale
Returns
The new MPM material.
See also
PxMPMMaterial

Implemented in physx::NpPhysics.

◆ createMPMParticleSystem()

virtual PxMPMParticleSystem * physx::PxPhysics::createMPMParticleSystem ( PxCudaContextManager &  cudaContextManager)
pure virtual

Creates a particle system with a material-point-method solver (MPM).

Warning
Feature under development, only for internal usage.

A MPM particle system can be used to simulate fluid dynamics and deformable body effects using particles.

Parameters
[in]cudaContextManagerThe PxCudaContextManager this instance is tied to.
Returns
the new particle system
See also
PxMPMParticleSystem

Implemented in physx::NpPhysics.

◆ createParticleAndDiffuseBuffer()

virtual PxParticleAndDiffuseBuffer * physx::PxPhysics::createParticleAndDiffuseBuffer ( PxU32  maxParticles,
PxU32  maxVolumes,
PxU32  maxDiffuseParticles,
PxCudaContextManager *  cudaContextManager 
)
pure virtual

Create a particle buffer for fluid dynamics with diffuse particles. Diffuse particles are used to simulate fluid effects such as foam, spray and bubbles.

Parameters
[in]maxParticlesThe maximum number of particles in this buffer.
[in]maxVolumesThe maximum number of volumes in this buffer. See #PxParticleVolume.
[in]maxDiffuseParticlesThe max number of diffuse particles int this buffer.
[in]cudaContextManagerThe PxCudaContextManager this buffer is tied to.
Returns
PxParticleAndDiffuseBuffer instance
See also
PxParticleAndDiffuseBuffer, PxDiffuseParticleParams

Implemented in physx::NpPhysics.

◆ createParticleBuffer()

virtual PxParticleBuffer * physx::PxPhysics::createParticleBuffer ( PxU32  maxParticles,
PxU32  maxVolumes,
PxCudaContextManager *  cudaContextManager 
)
pure virtual

Create particle buffer to simulate fluid/granular material.

Parameters
[in]maxParticlesThe maximum number of particles in this buffer.
[in]maxVolumesThe maximum number of volumes in this buffer. See PxParticleVolume.
[in]cudaContextManagerThe PxCudaContextManager this buffer is tied to.
Returns
PxParticleBuffer instance
See also
PxParticleBuffer

Implemented in physx::NpPhysics.

◆ createParticleClothBuffer()

virtual PxParticleClothBuffer * physx::PxPhysics::createParticleClothBuffer ( PxU32  maxParticles,
PxU32  maxNumVolumes,
PxU32  maxNumCloths,
PxU32  maxNumTriangles,
PxU32  maxNumSprings,
PxCudaContextManager *  cudaContextManager 
)
pure virtual

Create a particle buffer to simulate particle cloth.

Parameters
[in]maxParticlesThe maximum number of particles in this buffer.
[in]maxNumVolumesThe maximum number of volumes in this buffer. See #PxParticleVolume.
[in]maxNumClothsThe maximum number of cloths in this buffer. See #PxParticleCloth.
[in]maxNumTrianglesThe maximum number of triangles for aerodynamics.
[in]maxNumSpringsThe maximum number of springs to connect particles. See #PxParticleSpring.
[in]cudaContextManagerThe PxCudaContextManager this buffer is tied to.
Returns
PxParticleClothBuffer instance
See also
PxParticleClothBuffer

Implemented in physx::NpPhysics.

◆ createParticleRigidBuffer()

virtual PxParticleRigidBuffer * physx::PxPhysics::createParticleRigidBuffer ( PxU32  maxParticles,
PxU32  maxNumVolumes,
PxU32  maxNumRigids,
PxCudaContextManager *  cudaContextManager 
)
pure virtual

Create a particle buffer to simulate rigid bodies using shape matching with particles.

Parameters
[in]maxParticlesThe maximum number of particles in this buffer.
[in]maxNumVolumesThe maximum number of volumes in this buffer. See #PxParticleVolume.
[in]maxNumRigidsThe maximum number of rigid bodies this buffer is used to simulate.
[in]cudaContextManagerThe PxCudaContextManager this buffer is tied to.
Returns
PxParticleRigidBuffer instance
See also
PxParticleRigidBuffer

Implemented in physx::NpPhysics.

◆ createPBDMaterial()

virtual PxPBDMaterial * physx::PxPhysics::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 
)
pure virtual

Creates a new PBD material with certain default properties.

Parameters
[in]frictionThe friction parameter
[in]dampingThe velocity damping parameter
[in]adhesionThe adhesion parameter
[in]viscosityThe viscosity parameter
[in]vorticityConfinementThe vorticity confinement coefficient
[in]surfaceTensionThe surface tension coefficient
[in]cohesionThe cohesion parameter
[in]liftThe lift parameter
[in]dragThe drag parameter
[in]cflCoefficientThe Courant-Friedrichs-Lewy(cfl) coefficient
[in]gravityScaleThe gravity scale
Returns
The new PBD material.
See also
PxPBDMaterial

Implemented in physx::NpPhysics.

◆ createPBDParticleSystem()

virtual PxPBDParticleSystem * physx::PxPhysics::createPBDParticleSystem ( PxCudaContextManager &  cudaContextManager,
PxU32  maxNeighborhood = 96 
)
pure virtual

Creates a particle system with a position-based dynamics (PBD) solver.

A PBD particle system can be used to simulate particle systems with fluid and granular particles. It also allows simulating cloth using mass-spring constraints and rigid bodies by shape matching the bodies with particles.

Parameters
[in]cudaContextManagerThe PxCudaContextManager this instance is tied to.
[in]maxNeighborhoodThe maximum number of particles considered in neighborhood-based particle interaction calculations (e.g. fluid density constraints).
Returns
the new particle system
See also
PxPBDParticleSystem

Implemented in physx::NpPhysics.

◆ createPruningStructure()

virtual PxPruningStructure * physx::PxPhysics::createPruningStructure ( PxRigidActor *const *  actors,
PxU32  nbActors 
)
pure virtual

Creates a pruning structure from actors.

Note
Every provided actor needs at least one shape with the eSCENE_QUERY_SHAPE flag set.
Both static and dynamic actors can be provided.
It is not allowed to pass in actors which are already part of a scene.
Articulation links cannot be provided.
Parameters
[in]actorsArray of actors to add to the pruning structure. Must be non NULL.
[in]nbActorsNumber of actors in the array. Must be >0.
Returns
Pruning structure created from given actors, or NULL if any of the actors did not comply with the above requirements.
See also
PxActor PxPruningStructure

Implemented in physx::NpPhysics.

◆ createRigidDynamic()

virtual PxRigidDynamic * physx::PxPhysics::createRigidDynamic ( const PxTransform &  pose)
pure virtual

Creates a dynamic rigid actor with the specified pose and all other fields initialized to their default values.

Parameters
[in]poseThe initial pose of the actor. Must be a valid transform.
See also
PxRigidDynamic

Implemented in physx::NpPhysics.

◆ createRigidStatic()

virtual PxRigidStatic * physx::PxPhysics::createRigidStatic ( const PxTransform &  pose)
pure virtual

Creates a static rigid actor with the specified pose and all other fields initialized to their default values.

Parameters
[in]poseThe initial pose of the actor. Must be a valid transform.
See also
PxRigidStatic

Implemented in physx::NpPhysics.

◆ createScene()

virtual PxScene * physx::PxPhysics::createScene ( const PxSceneDesc &  sceneDesc)
pure virtual

Creates a scene.

Note
Every scene uses a Thread Local Storage slot. This imposes a platform specific limit on the number of scenes that can be created.
Parameters
[in]sceneDescScene descriptor. See #PxSceneDesc
Returns
The new scene object.
See also
PxScene PxScene.release() PxSceneDesc

Implemented in physx::NpPhysics.

◆ createShape() [1/3]

PX_FORCE_INLINE PxShape * physx::PxPhysics::createShape ( const PxGeometry &  geometry,
const PxFEMSoftBodyMaterial &  material,
bool  isExclusive = false,
PxShapeFlags  shapeFlags = PxShapeFlag::eVISUALIZATION | PxShapeFlag::eSCENE_QUERY_SHAPE | PxShapeFlag::eSIMULATION_SHAPE 
)
inline

Creates a shape which may be attached to one or more softbody actors.

The shape will be created with a reference count of 1.

Parameters
[in]geometryThe geometry for the shape
[in]materialThe material for the shape
[in]isExclusiveWhether this shape is exclusive to a single actor or maybe be shared
[in]shapeFlagsThe PxShapeFlags to be set
Returns
The shape
Note
Shared shapes are not mutable when they are attached to an actor
See also
PxShape

◆ createShape() [2/3]

PX_FORCE_INLINE PxShape * physx::PxPhysics::createShape ( const PxGeometry &  geometry,
const PxMaterial &  material,
bool  isExclusive = false,
PxShapeFlags  shapeFlags = PxShapeFlag::eVISUALIZATION | PxShapeFlag::eSCENE_QUERY_SHAPE | PxShapeFlag::eSIMULATION_SHAPE 
)
inline

Creates a shape which may be attached to multiple actors.

The shape will be created with a reference count of 1.

Parameters
[in]geometryThe geometry for the shape
[in]materialThe material for the shape
[in]isExclusiveWhether this shape is exclusive to a single actor or maybe be shared
[in]shapeFlagsThe PxShapeFlags to be set
Returns
The shape
Note
Shared shapes are not mutable when they are attached to an actor
See also
PxShape

◆ createShape() [3/3]

virtual PxShape * physx::PxPhysics::createShape ( const PxGeometry &  geometry,
PxMaterial *const *  materials,
PxU16  materialCount,
bool  isExclusive = false,
PxShapeFlags  shapeFlags = PxShapeFlag::eVISUALIZATION|PxShapeFlag::eSCENE_QUERY_SHAPE|PxShapeFlag::eSIMULATION_SHAPE 
)
pure virtual

Creates a shape which may be attached to multiple actors.

The shape will be created with a reference count of 1.

Parameters
[in]geometryThe geometry for the shape
[in]materialsThe materials for the shape
[in]materialCountThe number of materials
[in]isExclusiveWhether this shape is exclusive to a single actor or may be shared
[in]shapeFlagsThe PxShapeFlags to be set
Returns
The shape
Note
Shared shapes are not mutable when they are attached to an actor
Shapes created from SDF triangle-mesh geometries do not support more than one material.
See also
PxShape

Implemented in physx::NpPhysics.

◆ createSoftBody()

virtual PxSoftBody * physx::PxPhysics::createSoftBody ( PxCudaContextManager &  cudaContextManager)
pure virtual

Creates a FEM-based soft body with all fields initialized to their default values.

Parameters
[in]cudaContextManagerThe PxCudaContextManager this instance is tied to.
Returns
the new soft body
See also
PxSoftBody

Implemented in physx::NpPhysics.

◆ createSoftBodyMesh()

virtual PxSoftBodyMesh * physx::PxPhysics::createSoftBodyMesh ( PxInputStream &  stream)
pure virtual

Creates a softbody mesh object.

Parameters
[in]streamThe softbody mesh stream.
Returns
The new softbody mesh.
See also
createTetrahedronMesh

Implemented in physx::NpPhysics.

◆ createTetrahedronMesh()

virtual PxTetrahedronMesh * physx::PxPhysics::createTetrahedronMesh ( PxInputStream &  stream)
pure virtual

Creates a tetrahedron mesh object.

This can then be instanced into #PxShape objects.

Parameters
[in]streamThe tetrahedron mesh stream.
Returns
The new tetrahedron mesh.
See also
PxTetrahedronMesh PxMeshPreprocessingFlag PxTetrahedronMesh.release() PxInputStream PxTriangleMeshFlag

Implemented in physx::NpPhysics.

◆ createTriangleMesh()

virtual PxTriangleMesh * physx::PxPhysics::createTriangleMesh ( PxInputStream &  stream)
pure virtual

Creates a triangle mesh object.

This can then be instanced into #PxShape objects.

Parameters
[in]streamThe triangle mesh stream.
Returns
The new triangle mesh.
See also
PxTriangleMesh PxMeshPreprocessingFlag PxTriangleMesh.release() PxInputStream PxTriangleMeshFlag

Implemented in physx::NpPhysics.

◆ getBVHs()

virtual PxU32 physx::PxPhysics::getBVHs ( PxBVH **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Writes the array of bounding volume hierarchy pointers to a user buffer.

Returns the number of pointers written.

The ordering of the BVHs in the array is not specified.

Parameters
[out]userBufferThe buffer to receive BVH pointers.
[in]bufferSizeThe number of BVH pointers which can be stored in the buffer.
[in]startIndexIndex of first BVH pointer to be retrieved.
Returns
The number of BVH pointers written to userBuffer, this should be less or equal to bufferSize.
See also
getNbBVHs() PxBVH

Implemented in physx::NpPhysics.

◆ getBVHStructures()

PX_DEPRECATED PX_FORCE_INLINE PxU32 physx::PxPhysics::getBVHStructures ( PxBVHStructure **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
inline

◆ getConvexMeshes()

virtual PxU32 physx::PxPhysics::getConvexMeshes ( PxConvexMesh **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Writes the array of convex mesh pointers to a user buffer.

Returns the number of pointers written.

The ordering of the convex meshes in the array is not specified.

Parameters
[out]userBufferThe buffer to receive convex mesh pointers.
[in]bufferSizeThe number of convex mesh pointers which can be stored in the buffer.
[in]startIndexIndex of first convex mesh pointer to be retrieved.
Returns
The number of convex mesh pointers written to userBuffer, this should be less or equal to bufferSize.
See also
getNbConvexMeshes() PxConvexMesh

Implemented in physx::NpPhysics.

◆ getCustomMaterials()

virtual PxU32 physx::PxPhysics::getCustomMaterials ( PxCustomMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Writes the array of custom material pointers to a user buffer.

Warning
Feature under development, only for internal usage.

Returns the number of pointers written.

The ordering of the materials in the array is not specified.

Parameters
[out]userBufferThe buffer to receive material pointers.
[in]bufferSizeThe number of material pointers which can be stored in the buffer.
[in]startIndexIndex of first material pointer to be retrieved.
Returns
The number of material pointers written to userBuffer, this should be less or equal to bufferSize.
See also
getNbCustomMaterials() PxCustomMaterial

Implemented in physx::NpPhysics.

◆ getFEMClothMaterials()

virtual PxU32 physx::PxPhysics::getFEMClothMaterials ( PxFEMClothMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Writes the array of FEM cloth material pointers to a user buffer.

Returns the number of pointers written.

The ordering of the materials in the array is not specified.

Parameters
[out]userBufferThe buffer to receive material pointers.
[in]bufferSizeThe number of material pointers which can be stored in the buffer.
[in]startIndexIndex of first material pointer to be retrieved.
Returns
The number of material pointers written to userBuffer, this should be less or equal to bufferSize.
See also
getNbFEMClothMaterials() PxFEMClothMaterial

Implemented in physx::NpPhysics.

◆ getFEMSoftBodyMaterials()

virtual PxU32 physx::PxPhysics::getFEMSoftBodyMaterials ( PxFEMSoftBodyMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Writes the array of FEM soft body material pointers to a user buffer.

Returns the number of pointers written.

The ordering of the materials in the array is not specified.

Parameters
[out]userBufferThe buffer to receive material pointers.
[in]bufferSizeThe number of material pointers which can be stored in the buffer.
[in]startIndexIndex of first material pointer to be retrieved.
Returns
The number of material pointers written to userBuffer, this should be less or equal to bufferSize.
See also
getNbFEMSoftBodyMaterials() PxFEMSoftBodyMaterial

Implemented in physx::NpPhysics.

◆ getFLIPMaterials()

virtual PxU32 physx::PxPhysics::getFLIPMaterials ( PxFLIPMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Writes the array of FLIP material pointers to a user buffer.

Warning
Feature under development, only for internal usage.

Returns the number of pointers written.

The ordering of the materials in the array is not specified.

Parameters
[out]userBufferThe buffer to receive material pointers.
[in]bufferSizeThe number of material pointers which can be stored in the buffer.
[in]startIndexIndex of first material pointer to be retrieved.
Returns
The number of material pointers written to userBuffer, this should be less or equal to bufferSize.
See also
getNbFLIPMaterials() PxFLIPMaterial

Implemented in physx::NpPhysics.

◆ getFoundation()

virtual PxFoundation & physx::PxPhysics::getFoundation ( )
pure virtual

Retrieves the Foundation instance.

Returns
A reference to the Foundation object.

Implemented in physx::NpPhysics.

◆ getHeightFields()

virtual PxU32 physx::PxPhysics::getHeightFields ( PxHeightField **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Writes the array of heightfield pointers to a user buffer.

Returns the number of pointers written.

The ordering of the heightfields in the array is not specified.

Parameters
[out]userBufferThe buffer to receive heightfield pointers.
[in]bufferSizeThe number of heightfield pointers which can be stored in the buffer.
[in]startIndexIndex of first heightfield pointer to be retrieved.
Returns
The number of heightfield pointers written to userBuffer, this should be less or equal to bufferSize.
See also
getNbHeightFields() PxHeightField

Implemented in physx::NpPhysics.

◆ getMaterials()

virtual PxU32 physx::PxPhysics::getMaterials ( PxMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Writes the array of rigid body material pointers to a user buffer.

Returns the number of pointers written.

The ordering of the materials in the array is not specified.

Parameters
[out]userBufferThe buffer to receive material pointers.
[in]bufferSizeThe number of material pointers which can be stored in the buffer.
[in]startIndexIndex of first material pointer to be retrieved.
Returns
The number of material pointers written to userBuffer, this should be less or equal to bufferSize.
See also
getNbMaterials() PxMaterial

Implemented in physx::NpPhysics.

◆ getMPMMaterials()

virtual PxU32 physx::PxPhysics::getMPMMaterials ( PxMPMMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Writes the array of MPM material pointers to a user buffer.

Warning
Feature under development, only for internal usage.

Returns the number of pointers written.

The ordering of the materials in the array is not specified.

Parameters
[out]userBufferThe buffer to receive material pointers.
[in]bufferSizeThe number of material pointers which can be stored in the buffer.
[in]startIndexIndex of first material pointer to be retrieved.
Returns
The number of material pointers written to userBuffer, this should be less or equal to bufferSize.
See also
getNbMPMMaterials() PxMPMMaterial

Implemented in physx::NpPhysics.

◆ getNbBVHs()

virtual PxU32 physx::PxPhysics::getNbBVHs ( ) const
pure virtual

Return the number of bounding volume hierarchies that currently exist.

Returns
Number of bounding volume hierarchies.
See also
PxBVH getBVHs()

Implemented in physx::NpPhysics.

◆ getNbBVHStructures()

PX_DEPRECATED PX_FORCE_INLINE PxU32 physx::PxPhysics::getNbBVHStructures ( ) const
inline

◆ getNbConvexMeshes()

virtual PxU32 physx::PxPhysics::getNbConvexMeshes ( ) const
pure virtual

Return the number of convex meshes that currently exist.

Returns
Number of convex meshes.
See also
getConvexMeshes()

Implemented in physx::NpPhysics.

◆ getNbCustomMaterials()

virtual PxU32 physx::PxPhysics::getNbCustomMaterials ( ) const
pure virtual

Return the number of custom materials that currently exist.

Warning
Feature under development, only for internal usage.
Returns
Number of custom materials.
See also
getCustomMaterials()

Implemented in physx::NpPhysics.

◆ getNbFEMClothMaterials()

virtual PxU32 physx::PxPhysics::getNbFEMClothMaterials ( ) const
pure virtual

Return the number of FEM cloth materials that currently exist.

Returns
Number of FEM cloth materials.
See also
getFEMClothMaterials()

Implemented in physx::NpPhysics.

◆ getNbFEMSoftBodyMaterials()

virtual PxU32 physx::PxPhysics::getNbFEMSoftBodyMaterials ( ) const
pure virtual

Return the number of FEM soft body materials that currently exist.

Returns
Number of FEM materials.
See also
getFEMSoftBodyMaterials()

Implemented in physx::NpPhysics.

◆ getNbFLIPMaterials()

virtual PxU32 physx::PxPhysics::getNbFLIPMaterials ( ) const
pure virtual

Return the number of FLIP materials that currently exist.

Warning
Feature under development, only for internal usage.
Returns
Number of FLIP materials.
See also
getFLIPMaterials()

Implemented in physx::NpPhysics.

◆ getNbHeightFields()

virtual PxU32 physx::PxPhysics::getNbHeightFields ( ) const
pure virtual

Return the number of heightfields that currently exist.

Returns
Number of heightfields.
See also
getHeightFields()

Implemented in physx::NpPhysics.

◆ getNbMaterials()

virtual PxU32 physx::PxPhysics::getNbMaterials ( ) const
pure virtual

Return the number of rigid body materials that currently exist.

Returns
Number of rigid body materials.
See also
getMaterials()

Implemented in physx::NpPhysics.

◆ getNbMPMMaterials()

virtual PxU32 physx::PxPhysics::getNbMPMMaterials ( ) const
pure virtual

Return the number of MPM materials that currently exist.

Warning
Feature under development, only for internal usage.
Returns
Number of MPM materials.
See also
getMPMMaterials()

Implemented in physx::NpPhysics.

◆ getNbPBDMaterials()

virtual PxU32 physx::PxPhysics::getNbPBDMaterials ( ) const
pure virtual

Return the number of PBD materials that currently exist.

Returns
Number of PBD materials.
See also
getPBDMaterials()

Implemented in physx::NpPhysics.

◆ getNbScenes()

virtual PxU32 physx::PxPhysics::getNbScenes ( ) const
pure virtual

Gets number of created scenes.

Returns
The number of scenes created.
See also
getScenes()

Implemented in physx::NpPhysics.

◆ getNbShapes()

virtual PxU32 physx::PxPhysics::getNbShapes ( ) const
pure virtual

Return the number of shapes that currently exist.

Returns
Number of shapes.
See also
getShapes()

Implemented in physx::NpPhysics.

◆ getNbTetrahedronMeshes()

virtual PxU32 physx::PxPhysics::getNbTetrahedronMeshes ( ) const
pure virtual

Return the number of tetrahedron meshes that currently exist.

Returns
Number of tetrahedron meshes.
See also
getTetrahedronMeshes()

Implemented in physx::NpPhysics.

◆ getNbTriangleMeshes()

virtual PxU32 physx::PxPhysics::getNbTriangleMeshes ( ) const
pure virtual

Return the number of triangle meshes that currently exist.

Returns
Number of triangle meshes.
See also
getTriangleMeshes()

Implemented in physx::NpPhysics.

◆ getOmniPvd()

virtual PxOmniPvd * physx::PxPhysics::getOmniPvd ( )
pure virtual

Retrieves the PxOmniPvd instance if there is one registered with PxPhysics.

Returns
A pointer to a PxOmniPvd object.

Implemented in physx::NpPhysics.

◆ getPBDMaterials()

virtual PxU32 physx::PxPhysics::getPBDMaterials ( PxPBDMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Writes the array of PBD material pointers to a user buffer.

Returns the number of pointers written.

The ordering of the materials in the array is not specified.

Parameters
[out]userBufferThe buffer to receive material pointers.
[in]bufferSizeThe number of material pointers which can be stored in the buffer.
[in]startIndexIndex of first material pointer to be retrieved.
Returns
The number of material pointers written to userBuffer, this should be less or equal to bufferSize.
See also
getNbPBDMaterials() PxPBDMaterial

Implemented in physx::NpPhysics.

◆ getPhysicsInsertionCallback()

virtual PxInsertionCallback & physx::PxPhysics::getPhysicsInsertionCallback ( )
pure virtual

Gets PxPhysics object insertion interface.

The insertion interface is needed for PxCreateTriangleMesh, PxCooking::createTriangleMesh etc., this allows runtime mesh creation.

See also
PxCreateTriangleMesh PxCreateHeightField PxCreateTetrahedronMesh PxCreateBVH PxCooking::createTriangleMesh PxCooking::createHeightfield PxCooking::createTetrahedronMesh PxCooking::createBVH

Implemented in physx::NpPhysics.

◆ getScenes()

virtual PxU32 physx::PxPhysics::getScenes ( PxScene **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Writes the array of scene pointers to a user buffer.

Returns the number of pointers written.

The ordering of the scene pointers in the array is not specified.

Parameters
[out]userBufferThe buffer to receive scene pointers.
[in]bufferSizeThe number of scene pointers which can be stored in the buffer.
[in]startIndexIndex of first scene pointer to be retrieved.
Returns
The number of scene pointers written to userBuffer, this should be less or equal to bufferSize.
See also
getNbScenes() PxScene

Implemented in physx::NpPhysics.

◆ getShapes()

virtual PxU32 physx::PxPhysics::getShapes ( PxShape **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Writes the array of shape pointers to a user buffer.

Returns the number of pointers written.

The ordering of the shapes in the array is not specified.

Parameters
[out]userBufferThe buffer to receive shape pointers.
[in]bufferSizeThe number of shape pointers which can be stored in the buffer.
[in]startIndexIndex of first shape pointer to be retrieved
Returns
The number of shape pointers written to userBuffer, this should be less or equal to bufferSize.
See also
getNbShapes() PxShape

Implemented in physx::NpPhysics.

◆ getTetrahedronMeshes()

virtual PxU32 physx::PxPhysics::getTetrahedronMeshes ( PxTetrahedronMesh **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Writes the array of tetrahedron mesh pointers to a user buffer.

Returns the number of pointers written.

The ordering of the tetrahedron meshes in the array is not specified.

Parameters
[out]userBufferThe buffer to receive tetrahedron mesh pointers.
[in]bufferSizeThe number of tetrahedron mesh pointers which can be stored in the buffer.
[in]startIndexIndex of first mesh pointer to be retrieved.
Returns
The number of tetrahedron mesh pointers written to userBuffer, this should be less or equal to bufferSize.
See also
getNbTetrahedronMeshes() PxTetrahedronMesh

Implemented in physx::NpPhysics.

◆ getTolerancesScale()

virtual const PxTolerancesScale & physx::PxPhysics::getTolerancesScale ( ) const
pure virtual

Returns the simulation tolerance parameters.

Returns
The current simulation tolerance parameters.

Implemented in physx::NpPhysics.

◆ getTriangleMeshes()

virtual PxU32 physx::PxPhysics::getTriangleMeshes ( PxTriangleMesh **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Writes the array of triangle mesh pointers to a user buffer.

Returns the number of pointers written.

The ordering of the triangle meshes in the array is not specified.

Parameters
[out]userBufferThe buffer to receive triangle mesh pointers.
[in]bufferSizeThe number of triangle mesh pointers which can be stored in the buffer.
[in]startIndexIndex of first mesh pointer to be retrieved.
Returns
The number of triangle mesh pointers written to userBuffer, this should be less or equal to bufferSize.
See also
getNbTriangleMeshes() PxTriangleMesh

Implemented in physx::NpPhysics.

◆ registerDeletionListener()

virtual void physx::PxPhysics::registerDeletionListener ( PxDeletionListener &  observer,
const PxDeletionEventFlags &  deletionEvents,
bool  restrictedObjectSet = false 
)
pure virtual

Register a deletion listener. Listeners will be called whenever an object is deleted.

It is illegal to register or unregister a deletion listener while deletions are being processed.

Note
By default a registered listener will receive events from all objects. Set the restrictedObjectSet parameter to true on registration and use registerDeletionListenerObjects to restrict the received events to specific objects.
The deletion events are only supported on core PhysX objects. In general, objects in extension modules do not provide this functionality, however, in the case of PxJoint objects, the underlying PxConstraint will send the events.
Parameters
[in]observerObserver object to send notifications to.
[in]deletionEventsThe deletion event types to get notified of.
[in]restrictedObjectSetIf false, the deletion listener will get events from all objects, else the objects to receive events from have to be specified explicitly through registerDeletionListenerObjects.
See also
PxDeletionListener unregisterDeletionListener

Implemented in physx::NpPhysics.

◆ registerDeletionListenerObjects()

virtual void physx::PxPhysics::registerDeletionListenerObjects ( PxDeletionListener &  observer,
const PxBase *const *  observables,
PxU32  observableCount 
)
pure virtual

Register specific objects for deletion events.

This method allows for a deletion listener to limit deletion events to specific objects only.

Note
It is illegal to register or unregister objects while deletions are being processed.
The deletion listener has to be registered through registerDeletionListener() and configured to support restricted object sets prior to this method being used.
Parameters
[in]observerObserver object to send notifications to.
[in]observablesList of objects for which to receive deletion events. Only PhysX core objects are supported. In the case of PxJoint objects, the underlying PxConstraint can be used to get the events.
[in]observableCountSize of the observables list.
See also
PxDeletionListener unregisterDeletionListenerObjects

Implemented in physx::NpPhysics.

◆ release()

virtual void physx::PxPhysics::release ( )
pure virtual

Destroys the instance it is called on.

Use this release method to destroy an instance of this class. Be sure to not keep a reference to this object after calling release. Avoid release calls while a scene is simulating (in between simulate() and fetchResults() calls).

Note that this must be called once for each prior call to PxCreatePhysics, as there is a reference counter. Also note that you mustn't destroy the PxFoundation instance (holding the allocator, error callback etc.) until after the reference count reaches 0 and the SDK is actually removed.

Releasing an SDK will also release any objects created through it (scenes, triangle meshes, convex meshes, heightfields, shapes etc.), provided the user hasn't already done so.

Note
Releasing the PxPhysics instance is a prerequisite to releasing the PxFoundation instance.
See also
PxCreatePhysics() PxFoundation

Implemented in physx::NpPhysics.

◆ unregisterDeletionListener()

virtual void physx::PxPhysics::unregisterDeletionListener ( PxDeletionListener &  observer)
pure virtual

Unregister a deletion listener.

It is illegal to register or unregister a deletion listener while deletions are being processed.

Parameters
[in]observerObserver object to stop sending notifications to.
See also
PxDeletionListener registerDeletionListener

Implemented in physx::NpPhysics.

◆ unregisterDeletionListenerObjects()

virtual void physx::PxPhysics::unregisterDeletionListenerObjects ( PxDeletionListener &  observer,
const PxBase *const *  observables,
PxU32  observableCount 
)
pure virtual

Unregister specific objects for deletion events.

This method allows to clear previously registered objects for a deletion listener (see registerDeletionListenerObjects()).

Note
It is illegal to register or unregister objects while deletions are being processed.
The deletion listener has to be registered through registerDeletionListener() and configured to support restricted object sets prior to this method being used.
Parameters
[in]observerObserver object to stop sending notifications to.
[in]observablesList of objects for which to not receive deletion events anymore.
[in]observableCountSize of the observables list.
See also
PxDeletionListener registerDeletionListenerObjects

Implemented in physx::NpPhysics.


The documentation for this class was generated from the following file: