RavEngine
Loading...
Searching...
No Matches
physx::NpPhysics Class Reference
Inheritance diagram for physx::NpPhysics:
[legend]
Collaboration diagram for physx::NpPhysics:
[legend]

Public Member Functions

virtual void release () PX_OVERRIDE
 Destroys the instance it is called on.
 
virtual PxOmniPvd * getOmniPvd () PX_OVERRIDE
 Retrieves the PxOmniPvd instance if there is one registered with PxPhysics.
 
virtual PxScene * createScene (const PxSceneDesc &) PX_OVERRIDE
 Creates a scene.
 
void releaseSceneInternal (PxScene &)
 
virtual PxU32 getNbScenes () const PX_OVERRIDE
 Gets number of created scenes.
 
virtual PxU32 getScenes (PxScene **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 Writes the array of scene pointers to a user buffer.
 
virtual PxRigidStatic * createRigidStatic (const PxTransform &) PX_OVERRIDE
 Creates a static rigid actor with the specified pose and all other fields initialized to their default values.
 
virtual PxRigidDynamic * createRigidDynamic (const PxTransform &) PX_OVERRIDE
 Creates a dynamic rigid actor with the specified pose and all other fields initialized to their default values.
 
virtual PxArticulationReducedCoordinate * createArticulationReducedCoordinate () PX_OVERRIDE
 Creates a reduced-coordinate articulation with all fields initialized to their default values.
 
virtual PxSoftBody * createSoftBody (PxCudaContextManager &cudaContextManager) PX_OVERRIDE
 Creates a FEM-based soft body with all fields initialized to their default values.
 
virtual PxHairSystem * createHairSystem (PxCudaContextManager &cudaContextManager) PX_OVERRIDE
 Creates a hair system with all fields initialized to their default values.
 
virtual PxFEMCloth * createFEMCloth (PxCudaContextManager &cudaContextManager) PX_OVERRIDE
 Creates a FEM-based cloth with all fields initialized to their default values.
 
virtual PxPBDParticleSystem * createPBDParticleSystem (PxCudaContextManager &cudaContexManager, PxU32 maxNeighborhood) PX_OVERRIDE
 Creates a particle system with a position-based dynamics (PBD) solver.
 
virtual PxFLIPParticleSystem * createFLIPParticleSystem (PxCudaContextManager &cudaContexManager) PX_OVERRIDE
 Creates a particle system with a fluid-implicit particle solver (FLIP).
 
virtual PxMPMParticleSystem * createMPMParticleSystem (PxCudaContextManager &cudaContexManager) PX_OVERRIDE
 Creates a particle system with a material-point-method solver (MPM).
 
virtual PxCustomParticleSystem * createCustomParticleSystem (PxCudaContextManager &cudaContexManager, PxU32 maxNeighborhood) PX_OVERRIDE
 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) PX_OVERRIDE
 Create a buffer for reading and writing data across host and device memory spaces.
 
virtual PxConstraint * createConstraint (PxRigidActor *actor0, PxRigidActor *actor1, PxConstraintConnector &connector, const PxConstraintShaderTable &shaders, PxU32 dataSize) PX_OVERRIDE
 Creates a constraint shader.
 
virtual PxAggregate * createAggregate (PxU32 maxActors, PxU32 maxShapes, PxAggregateFilterHint filterHint) PX_OVERRIDE
 Creates an aggregate with the specified maximum size and filtering hint.
 
virtual PxShape * createShape (const PxGeometry &, PxMaterial *const *, PxU16, bool, PxShapeFlags shapeFlags) PX_OVERRIDE
 Creates a shape which may be attached to multiple actors.
 
virtual PxShape * createShape (const PxGeometry &, PxFEMSoftBodyMaterial *const *, PxU16, bool, PxShapeFlags shapeFlags) PX_OVERRIDE
 
virtual PxShape * createShape (const PxGeometry &, PxFEMClothMaterial *const *, PxU16, bool, PxShapeFlags shapeFlags) PX_OVERRIDE
 
virtual PxU32 getNbShapes () const PX_OVERRIDE
 Return the number of shapes that currently exist.
 
virtual PxU32 getShapes (PxShape **userBuffer, PxU32 bufferSize, PxU32 startIndex) const PX_OVERRIDE
 Writes the array of shape pointers to a user buffer.
 
virtual PxMaterial * createMaterial (PxReal staticFriction, PxReal dynamicFriction, PxReal restitution) PX_OVERRIDE
 Creates a new rigid body material with certain default properties.
 
virtual PxU32 getNbMaterials () const PX_OVERRIDE
 Return the number of rigid body materials that currently exist.
 
virtual PxU32 getMaterials (PxMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 Writes the array of rigid body material pointers to a user buffer.
 
virtual PxFEMSoftBodyMaterial * createFEMSoftBodyMaterial (PxReal youngs, PxReal poissons, PxReal dynamicFriction) PX_OVERRIDE
 Creates a new FEM soft body material with certain default properties.
 
virtual PxU32 getNbFEMSoftBodyMaterials () const PX_OVERRIDE
 Return the number of FEM soft body materials that currently exist.
 
virtual PxU32 getFEMSoftBodyMaterials (PxFEMSoftBodyMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 Writes the array of FEM soft body material pointers to a user buffer.
 
virtual PxFEMClothMaterial * createFEMClothMaterial (PxReal youngs, PxReal poissons, PxReal dynamicFriction) PX_OVERRIDE
 Creates a new FEM cloth material with certain default properties.
 
virtual PxU32 getNbFEMClothMaterials () const PX_OVERRIDE
 Return the number of FEM cloth materials that currently exist.
 
virtual PxU32 getFEMClothMaterials (PxFEMClothMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 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, PxReal gravityScale) PX_OVERRIDE
 Creates a new PBD material with certain default properties.
 
virtual PxU32 getNbPBDMaterials () const PX_OVERRIDE
 Return the number of PBD materials that currently exist.
 
virtual PxU32 getPBDMaterials (PxPBDMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 Writes the array of PBD material pointers to a user buffer.
 
virtual PxFLIPMaterial * createFLIPMaterial (PxReal friction, PxReal damping, PxReal maxVelocity, PxReal viscosity, PxReal gravityScale) PX_OVERRIDE
 Creates a new FLIP material with certain default properties.
 
virtual PxU32 getNbFLIPMaterials () const PX_OVERRIDE
 Return the number of FLIP materials that currently exist.
 
virtual PxU32 getFLIPMaterials (PxFLIPMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 Writes the array of FLIP material pointers to a user buffer.
 
virtual PxMPMMaterial * createMPMMaterial (PxReal friction, PxReal damping, PxReal maxVelocity, bool isPlastic, PxReal youngsModulus, PxReal poissons, PxReal hardening, PxReal criticalCompression, PxReal criticalStretch, PxReal tensileDamageSensitivity, PxReal compressiveDamageSensitivity, PxReal attractiveForceResidual, PxReal gravityScale) PX_OVERRIDE
 Creates a new MPM material with certain default properties.
 
virtual PxU32 getNbMPMMaterials () const PX_OVERRIDE
 Return the number of MPM materials that currently exist.
 
virtual PxU32 getMPMMaterials (PxMPMMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 Writes the array of MPM material pointers to a user buffer.
 
virtual PxCustomMaterial * createCustomMaterial (void *gpuBuffer) PX_OVERRIDE
 Creates a new material for custom particle systems.
 
virtual PxU32 getNbCustomMaterials () const PX_OVERRIDE
 Return the number of custom materials that currently exist.
 
virtual PxU32 getCustomMaterials (PxCustomMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 Writes the array of custom material pointers to a user buffer.
 
virtual PxTriangleMesh * createTriangleMesh (PxInputStream &) PX_OVERRIDE
 Creates a triangle mesh object.
 
virtual PxU32 getNbTriangleMeshes () const PX_OVERRIDE
 Return the number of triangle meshes that currently exist.
 
virtual PxU32 getTriangleMeshes (PxTriangleMesh **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 Writes the array of triangle mesh pointers to a user buffer.
 
virtual PxTetrahedronMesh * createTetrahedronMesh (PxInputStream &) PX_OVERRIDE
 Creates a tetrahedron mesh object.
 
virtual PxU32 getNbTetrahedronMeshes () const PX_OVERRIDE
 Return the number of tetrahedron meshes that currently exist.
 
virtual PxU32 getTetrahedronMeshes (PxTetrahedronMesh **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 Writes the array of tetrahedron mesh pointers to a user buffer.
 
virtual PxSoftBodyMesh * createSoftBodyMesh (PxInputStream &) PX_OVERRIDE
 Creates a softbody mesh object.
 
virtual PxHeightField * createHeightField (PxInputStream &stream) PX_OVERRIDE
 Creates a heightfield object from previously cooked stream.
 
virtual PxU32 getNbHeightFields () const PX_OVERRIDE
 Return the number of heightfields that currently exist.
 
virtual PxU32 getHeightFields (PxHeightField **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 Writes the array of heightfield pointers to a user buffer.
 
virtual PxConvexMesh * createConvexMesh (PxInputStream &) PX_OVERRIDE
 Creates a convex mesh object.
 
virtual PxU32 getNbConvexMeshes () const PX_OVERRIDE
 Return the number of convex meshes that currently exist.
 
virtual PxU32 getConvexMeshes (PxConvexMesh **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 Writes the array of convex mesh pointers to a user buffer.
 
virtual PxBVH * createBVH (PxInputStream &) PX_OVERRIDE
 Creates a bounding volume hierarchy.
 
virtual PxU32 getNbBVHs () const PX_OVERRIDE
 Return the number of bounding volume hierarchies that currently exist.
 
virtual PxU32 getBVHs (PxBVH **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 Writes the array of bounding volume hierarchy pointers to a user buffer.
 
virtual PxParticleBuffer * createParticleBuffer (PxU32 maxParticles, PxU32 maxVolumes, PxCudaContextManager *cudaContexManager) PX_OVERRIDE
 Create particle buffer to simulate fluid/granular material.
 
virtual PxParticleAndDiffuseBuffer * createParticleAndDiffuseBuffer (PxU32 maxParticles, PxU32 maxVolumes, PxU32 maxDiffuseParticles, PxCudaContextManager *cudaContexManager) PX_OVERRIDE
 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 *cudaContexManager) PX_OVERRIDE
 Create a particle buffer to simulate particle cloth.
 
virtual PxParticleRigidBuffer * createParticleRigidBuffer (PxU32 maxParticles, PxU32 maxNumVolumes, PxU32 maxNumRigids, PxCudaContextManager *cudaContexManager) PX_OVERRIDE
 Create a particle buffer to simulate rigid bodies using shape matching with particles.
 
PX_FORCE_INLINE void registerPhysXIndicatorGpuClient ()
 
PX_FORCE_INLINE void unregisterPhysXIndicatorGpuClient ()
 
virtual PxPruningStructure * createPruningStructure (PxRigidActor *const *actors, PxU32 nbActors) PX_OVERRIDE
 Creates a pruning structure from actors.
 
virtual const PxTolerancesScale & getTolerancesScale () const PX_OVERRIDE
 Returns the simulation tolerance parameters.
 
virtual PxFoundation & getFoundation () PX_OVERRIDE
 Retrieves the Foundation instance.
 
PX_INLINE NpScene * getScene (PxU32 i) const
 
PX_INLINE PxU32 getNumScenes () const
 
virtual void registerDeletionListener (PxDeletionListener &observer, const PxDeletionEventFlags &deletionEvents, bool restrictedObjectSet) PX_OVERRIDE
 Register a deletion listener. Listeners will be called whenever an object is deleted.
 
virtual void unregisterDeletionListener (PxDeletionListener &observer) PX_OVERRIDE
 Unregister a deletion listener.
 
virtual void registerDeletionListenerObjects (PxDeletionListener &observer, const PxBase *const *observables, PxU32 observableCount) PX_OVERRIDE
 Register specific objects for deletion events.
 
virtual void unregisterDeletionListenerObjects (PxDeletionListener &observer, const PxBase *const *observables, PxU32 observableCount) PX_OVERRIDE
 Unregister specific objects for deletion events.
 
void notifyDeletionListeners (const PxBase *, void *userData, PxDeletionEventFlag::Enum deletionEvent)
 
PX_FORCE_INLINE void notifyDeletionListenersUserRelease (const PxBase *b, void *userData)
 
PX_FORCE_INLINE void notifyDeletionListenersMemRelease (const PxBase *b, void *userData)
 
virtual PxInsertionCallback & getPhysicsInsertionCallback () PX_OVERRIDE
 Gets PxPhysics object insertion interface.
 
void removeMaterialFromTable (NpMaterial &)
 
void updateMaterial (NpMaterial &)
 
bool sendMaterialTable (NpScene &)
 
NpMaterialManager< NpMaterial > & getMaterialManager ()
 
NpMaterialManager< NpFEMSoftBodyMaterial > & getFEMSoftBodyMaterialManager ()
 
NpMaterialManager< NpPBDMaterial > & getPBDMaterialManager ()
 
NpMaterial * addMaterial (NpMaterial *np)
 
void removeFEMSoftBodyMaterialFromTable (NpFEMSoftBodyMaterial &)
 
void updateFEMSoftBodyMaterial (NpFEMSoftBodyMaterial &)
 
NpFEMSoftBodyMaterial * addFEMMaterial (NpFEMSoftBodyMaterial *np)
 
void removePBDMaterialFromTable (NpPBDMaterial &)
 
void updatePBDMaterial (NpPBDMaterial &)
 
NpPBDMaterial * addPBDMaterial (NpPBDMaterial *np)
 
- Public Member Functions inherited from physx::PxPhysics
PX_FORCE_INLINE PX_DEPRECATED PxAggregate * createAggregate (PxU32 maxActor, PxAggregateFilterHint filterHint)
 Creates an aggregate with the specified maximum size and filtering hint.
 
PX_DEPRECATED PX_FORCE_INLINE PxBVH * createBVHStructure (PxInputStream &stream)
 
PX_DEPRECATED PX_FORCE_INLINE PxU32 getNbBVHStructures () const
 
PX_DEPRECATED PX_FORCE_INLINE PxU32 getBVHStructures (PxBVHStructure **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const
 
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.
 
- Public Member Functions inherited from physx::PxUserAllocated
PX_INLINE void * operator new (size_t, void *address)
 
PX_INLINE void operator delete (void *, void *)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete (void *ptr, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete[] (void *ptr, Alloc alloc, const char *fileName, int line)
 
PX_INLINE void operator delete (void *ptr)
 
PX_INLINE void operator delete[] (void *ptr)
 

Static Public Member Functions

static NpPhysics * createInstance (PxU32 version, PxFoundation &foundation, const PxTolerancesScale &scale, bool trackOutstandingAllocations, physx::pvdsdk::PsPvd *pvd, physx::PxOmniPvd *omniPvd)
 
static PxU32 releaseInstance ()
 
static NpPhysics & getInstance ()
 
static void initOffsetTables (PxvOffsetTable &pxvOffsetTable)
 

Static Public Attributes

static bool apiReentryLock = false
 

Friends

class NpCollection
 

Member Function Documentation

◆ createAggregate()

PxAggregate * NpPhysics::createAggregate ( PxU32  maxActor,
PxU32  maxShape,
PxAggregateFilterHint  filterHint 
)
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

Implements physx::PxPhysics.

◆ createArticulationReducedCoordinate()

PxArticulationReducedCoordinate * NpPhysics::createArticulationReducedCoordinate ( )
virtual

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

Returns
the new articulation
See also
PxArticulationReducedCoordinate, PxRegisterArticulationsReducedCoordinate

Implements physx::PxPhysics.

◆ createBuffer()

PxBuffer * NpPhysics::createBuffer ( PxU64  byteSize,
PxBufferType::Enum  bufferType,
PxCudaContextManager *  cudaContextManager 
)
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

Implements physx::PxPhysics.

◆ createBVH()

PxBVH * NpPhysics::createBVH ( PxInputStream &  stream)
virtual

Creates a bounding volume hierarchy.

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

Implements physx::PxPhysics.

◆ createConstraint()

PxConstraint * NpPhysics::createConstraint ( PxRigidActor *  actor0,
PxRigidActor *  actor1,
PxConstraintConnector &  connector,
const PxConstraintShaderTable &  shaders,
PxU32  dataSize 
)
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

Implements physx::PxPhysics.

◆ createConvexMesh()

PxConvexMesh * NpPhysics::createConvexMesh ( PxInputStream &  stream)
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

Implements physx::PxPhysics.

◆ createCustomMaterial()

PxCustomMaterial * NpPhysics::createCustomMaterial ( void *  gpuBuffer)
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.

Implements physx::PxPhysics.

◆ createCustomParticleSystem()

PxCustomParticleSystem * NpPhysics::createCustomParticleSystem ( PxCudaContextManager &  cudaContextManager,
PxU32  maxNeighborhood 
)
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

Implements physx::PxPhysics.

◆ createFEMCloth()

PxFEMCloth * NpPhysics::createFEMCloth ( PxCudaContextManager &  cudaContextManager)
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

Implements physx::PxPhysics.

◆ createFEMClothMaterial()

PxFEMClothMaterial * NpPhysics::createFEMClothMaterial ( PxReal  youngs,
PxReal  poissons,
PxReal  dynamicFriction 
)
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

Implements physx::PxPhysics.

◆ createFEMSoftBodyMaterial()

PxFEMSoftBodyMaterial * NpPhysics::createFEMSoftBodyMaterial ( PxReal  youngs,
PxReal  poissons,
PxReal  dynamicFriction 
)
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

Implements physx::PxPhysics.

◆ createFLIPMaterial()

PxFLIPMaterial * NpPhysics::createFLIPMaterial ( PxReal  friction,
PxReal  damping,
PxReal  adhesion,
PxReal  viscosity,
PxReal  gravityScale 
)
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

Implements physx::PxPhysics.

◆ createFLIPParticleSystem()

PxFLIPParticleSystem * NpPhysics::createFLIPParticleSystem ( PxCudaContextManager &  cudaContextManager)
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

Implements physx::PxPhysics.

◆ createHairSystem()

PxHairSystem * NpPhysics::createHairSystem ( PxCudaContextManager &  cudaContextManager)
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

Implements physx::PxPhysics.

◆ createHeightField()

PxHeightField * NpPhysics::createHeightField ( PxInputStream &  stream)
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

Implements physx::PxPhysics.

◆ createMaterial()

PxMaterial * NpPhysics::createMaterial ( PxReal  staticFriction,
PxReal  dynamicFriction,
PxReal  restitution 
)
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

Implements physx::PxPhysics.

◆ createMPMMaterial()

PxMPMMaterial * NpPhysics::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 
)
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

Implements physx::PxPhysics.

◆ createMPMParticleSystem()

PxMPMParticleSystem * NpPhysics::createMPMParticleSystem ( PxCudaContextManager &  cudaContextManager)
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

Implements physx::PxPhysics.

◆ createParticleAndDiffuseBuffer()

PxParticleAndDiffuseBuffer * NpPhysics::createParticleAndDiffuseBuffer ( PxU32  maxParticles,
PxU32  maxVolumes,
PxU32  maxDiffuseParticles,
PxCudaContextManager *  cudaContextManager 
)
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

Implements physx::PxPhysics.

◆ createParticleBuffer()

PxParticleBuffer * NpPhysics::createParticleBuffer ( PxU32  maxParticles,
PxU32  maxVolumes,
PxCudaContextManager *  cudaContextManager 
)
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

Implements physx::PxPhysics.

◆ createParticleClothBuffer()

PxParticleClothBuffer * NpPhysics::createParticleClothBuffer ( PxU32  maxParticles,
PxU32  maxNumVolumes,
PxU32  maxNumCloths,
PxU32  maxNumTriangles,
PxU32  maxNumSprings,
PxCudaContextManager *  cudaContextManager 
)
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

Implements physx::PxPhysics.

◆ createParticleRigidBuffer()

PxParticleRigidBuffer * NpPhysics::createParticleRigidBuffer ( PxU32  maxParticles,
PxU32  maxNumVolumes,
PxU32  maxNumRigids,
PxCudaContextManager *  cudaContextManager 
)
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

Implements physx::PxPhysics.

◆ createPBDMaterial()

PxPBDMaterial * NpPhysics::createPBDMaterial ( PxReal  friction,
PxReal  damping,
PxReal  adhesion,
PxReal  viscosity,
PxReal  vorticityConfinement,
PxReal  surfaceTension,
PxReal  cohesion,
PxReal  lift,
PxReal  drag,
PxReal  cflCoefficient,
PxReal  gravityScale 
)
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

Implements physx::PxPhysics.

◆ createPBDParticleSystem()

PxPBDParticleSystem * NpPhysics::createPBDParticleSystem ( PxCudaContextManager &  cudaContextManager,
PxU32  maxNeighborhood 
)
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

Implements physx::PxPhysics.

◆ createPruningStructure()

PxPruningStructure * NpPhysics::createPruningStructure ( PxRigidActor *const *  actors,
PxU32  nbActors 
)
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

Implements physx::PxPhysics.

◆ createRigidDynamic()

PxRigidDynamic * NpPhysics::createRigidDynamic ( const PxTransform &  pose)
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

Implements physx::PxPhysics.

◆ createRigidStatic()

PxRigidStatic * NpPhysics::createRigidStatic ( const PxTransform &  pose)
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

Implements physx::PxPhysics.

◆ createScene()

PxScene * NpPhysics::createScene ( const PxSceneDesc &  sceneDesc)
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

Implements physx::PxPhysics.

◆ createShape() [1/3]

PxShape * NpPhysics::createShape ( const PxGeometry &  ,
PxFEMClothMaterial *const *  ,
PxU16  ,
bool  ,
PxShapeFlags  shapeFlags 
)
virtual

Implements physx::PxPhysics.

◆ createShape() [2/3]

PxShape * NpPhysics::createShape ( const PxGeometry &  geometry,
PxFEMSoftBodyMaterial *const *  materials,
PxU16  materialCount,
bool  isExclusive,
PxShapeFlags  shapeFlags 
)
virtual

Implements physx::PxPhysics.

◆ createShape() [3/3]

PxShape * NpPhysics::createShape ( const PxGeometry &  geometry,
PxMaterial *const *  materials,
PxU16  materialCount,
bool  isExclusive,
PxShapeFlags  shapeFlags 
)
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

Implements physx::PxPhysics.

◆ createSoftBody()

PxSoftBody * NpPhysics::createSoftBody ( PxCudaContextManager &  cudaContextManager)
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

Implements physx::PxPhysics.

◆ createSoftBodyMesh()

PxSoftBodyMesh * NpPhysics::createSoftBodyMesh ( PxInputStream &  stream)
virtual

Creates a softbody mesh object.

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

Implements physx::PxPhysics.

◆ createTetrahedronMesh()

PxTetrahedronMesh * NpPhysics::createTetrahedronMesh ( PxInputStream &  stream)
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

Implements physx::PxPhysics.

◆ createTriangleMesh()

PxTriangleMesh * NpPhysics::createTriangleMesh ( PxInputStream &  stream)
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

Implements physx::PxPhysics.

◆ getBVHs()

PxU32 NpPhysics::getBVHs ( PxBVH **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
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

Implements physx::PxPhysics.

◆ getConvexMeshes()

PxU32 NpPhysics::getConvexMeshes ( PxConvexMesh **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
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

Implements physx::PxPhysics.

◆ getCustomMaterials()

PxU32 NpPhysics::getCustomMaterials ( PxCustomMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
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

Implements physx::PxPhysics.

◆ getFEMClothMaterials()

PxU32 NpPhysics::getFEMClothMaterials ( PxFEMClothMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
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

Implements physx::PxPhysics.

◆ getFEMSoftBodyMaterials()

PxU32 NpPhysics::getFEMSoftBodyMaterials ( PxFEMSoftBodyMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
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

Implements physx::PxPhysics.

◆ getFLIPMaterials()

PxU32 NpPhysics::getFLIPMaterials ( PxFLIPMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
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

Implements physx::PxPhysics.

◆ getFoundation()

PxFoundation & NpPhysics::getFoundation ( )
virtual

Retrieves the Foundation instance.

Returns
A reference to the Foundation object.

Implements physx::PxPhysics.

◆ getHeightFields()

PxU32 NpPhysics::getHeightFields ( PxHeightField **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
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

Implements physx::PxPhysics.

◆ getMaterials()

PxU32 NpPhysics::getMaterials ( PxMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
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

Implements physx::PxPhysics.

◆ getMPMMaterials()

PxU32 NpPhysics::getMPMMaterials ( PxMPMMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
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

Implements physx::PxPhysics.

◆ getNbBVHs()

PxU32 NpPhysics::getNbBVHs ( ) const
virtual

Return the number of bounding volume hierarchies that currently exist.

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

Implements physx::PxPhysics.

◆ getNbConvexMeshes()

PxU32 NpPhysics::getNbConvexMeshes ( ) const
virtual

Return the number of convex meshes that currently exist.

Returns
Number of convex meshes.
See also
getConvexMeshes()

Implements physx::PxPhysics.

◆ getNbCustomMaterials()

PxU32 NpPhysics::getNbCustomMaterials ( ) const
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()

Implements physx::PxPhysics.

◆ getNbFEMClothMaterials()

PxU32 NpPhysics::getNbFEMClothMaterials ( ) const
virtual

Return the number of FEM cloth materials that currently exist.

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

Implements physx::PxPhysics.

◆ getNbFEMSoftBodyMaterials()

PxU32 NpPhysics::getNbFEMSoftBodyMaterials ( ) const
virtual

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

Returns
Number of FEM materials.
See also
getFEMSoftBodyMaterials()

Implements physx::PxPhysics.

◆ getNbFLIPMaterials()

PxU32 NpPhysics::getNbFLIPMaterials ( ) const
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()

Implements physx::PxPhysics.

◆ getNbHeightFields()

PxU32 NpPhysics::getNbHeightFields ( ) const
virtual

Return the number of heightfields that currently exist.

Returns
Number of heightfields.
See also
getHeightFields()

Implements physx::PxPhysics.

◆ getNbMaterials()

PxU32 NpPhysics::getNbMaterials ( ) const
virtual

Return the number of rigid body materials that currently exist.

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

Implements physx::PxPhysics.

◆ getNbMPMMaterials()

PxU32 NpPhysics::getNbMPMMaterials ( ) const
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()

Implements physx::PxPhysics.

◆ getNbPBDMaterials()

PxU32 NpPhysics::getNbPBDMaterials ( ) const
virtual

Return the number of PBD materials that currently exist.

Returns
Number of PBD materials.
See also
getPBDMaterials()

Implements physx::PxPhysics.

◆ getNbScenes()

PxU32 NpPhysics::getNbScenes ( ) const
virtual

Gets number of created scenes.

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

Implements physx::PxPhysics.

◆ getNbShapes()

PxU32 NpPhysics::getNbShapes ( ) const
virtual

Return the number of shapes that currently exist.

Returns
Number of shapes.
See also
getShapes()

Implements physx::PxPhysics.

◆ getNbTetrahedronMeshes()

PxU32 NpPhysics::getNbTetrahedronMeshes ( ) const
virtual

Return the number of tetrahedron meshes that currently exist.

Returns
Number of tetrahedron meshes.
See also
getTetrahedronMeshes()

Implements physx::PxPhysics.

◆ getNbTriangleMeshes()

PxU32 NpPhysics::getNbTriangleMeshes ( ) const
virtual

Return the number of triangle meshes that currently exist.

Returns
Number of triangle meshes.
See also
getTriangleMeshes()

Implements physx::PxPhysics.

◆ getOmniPvd()

PxOmniPvd * NpPhysics::getOmniPvd ( )
virtual

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

Returns
A pointer to a PxOmniPvd object.

Implements physx::PxPhysics.

◆ getPBDMaterials()

PxU32 NpPhysics::getPBDMaterials ( PxPBDMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
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

Implements physx::PxPhysics.

◆ getPhysicsInsertionCallback()

virtual PxInsertionCallback & physx::NpPhysics::getPhysicsInsertionCallback ( )
inlinevirtual

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

Implements physx::PxPhysics.

◆ getScenes()

PxU32 NpPhysics::getScenes ( PxScene **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
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

Implements physx::PxPhysics.

◆ getShapes()

PxU32 NpPhysics::getShapes ( PxShape **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex 
) const
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

Implements physx::PxPhysics.

◆ getTetrahedronMeshes()

PxU32 NpPhysics::getTetrahedronMeshes ( PxTetrahedronMesh **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
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

Implements physx::PxPhysics.

◆ getTolerancesScale()

const PxTolerancesScale & NpPhysics::getTolerancesScale ( ) const
virtual

Returns the simulation tolerance parameters.

Returns
The current simulation tolerance parameters.

Implements physx::PxPhysics.

◆ getTriangleMeshes()

PxU32 NpPhysics::getTriangleMeshes ( PxTriangleMesh **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
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

Implements physx::PxPhysics.

◆ registerDeletionListener()

void NpPhysics::registerDeletionListener ( PxDeletionListener &  observer,
const PxDeletionEventFlags &  deletionEvents,
bool  restrictedObjectSet 
)
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

Implements physx::PxPhysics.

◆ registerDeletionListenerObjects()

void NpPhysics::registerDeletionListenerObjects ( PxDeletionListener &  observer,
const PxBase *const *  observables,
PxU32  observableCount 
)
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

Implements physx::PxPhysics.

◆ release()

void NpPhysics::release ( )
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

Implements physx::PxPhysics.

◆ unregisterDeletionListener()

void NpPhysics::unregisterDeletionListener ( PxDeletionListener &  observer)
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

Implements physx::PxPhysics.

◆ unregisterDeletionListenerObjects()

void NpPhysics::unregisterDeletionListenerObjects ( PxDeletionListener &  observer,
const PxBase *const *  observables,
PxU32  observableCount 
)
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

Implements physx::PxPhysics.


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