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

The shared base class for all particle systems. More...

#include <PxParticleSystem.h>

Inheritance diagram for physx::PxParticleSystem:
[legend]
Collaboration diagram for physx::PxParticleSystem:
[legend]

Public Member Functions

virtual void setSolverIterationCounts (PxU32 minPositionIters, PxU32 minVelocityIters=1)=0
 Sets the solver iteration counts for the body.
 
virtual void getSolverIterationCounts (PxU32 &minPositionIters, PxU32 &minVelocityIters) const =0
 Retrieves the solver iteration counts.
 
virtual PxFilterData getSimulationFilterData () const =0
 Retrieves the collision filter settings.
 
virtual void setSimulationFilterData (const PxFilterData &data)=0
 Set collision filter settings.
 
virtual void setParticleFlag (PxParticleFlag::Enum flag, bool val)=0
 Set particle flag.
 
virtual void setParticleFlags (PxParticleFlags flags)=0
 Set particle flags.
 
virtual PxParticleFlags getParticleFlags () const =0
 Retrieves the particle flags.
 
virtual void setMaxDepenetrationVelocity (PxReal maxDepenetrationVelocity)=0
 Set the maximal depenetration velocity particles can reach.
 
virtual PxReal getMaxDepenetrationVelocity ()=0
 Retrieves maximal depenetration velocity a particle can have.
 
virtual void setMaxVelocity (PxReal maxVelocity)=0
 Set the maximal velocity particles can reach.
 
virtual PxReal getMaxVelocity ()=0
 Retrieves maximal velocity a particle can have.
 
virtual PxCudaContextManager * getCudaContextManager () const =0
 Return the cuda context manager.
 
virtual void setRestOffset (PxReal restOffset)=0
 Set the rest offset for the collision between particles and rigids or soft bodies.
 
virtual PxReal getRestOffset () const =0
 Return the rest offset.
 
virtual void setContactOffset (PxReal contactOffset)=0
 Set the contact offset for the collision between particles and rigids or soft bodies.
 
virtual PxReal getContactOffset () const =0
 Return the contact offset.
 
virtual void setParticleContactOffset (PxReal particleContactOffset)=0
 Set the contact offset for the interactions between particles.
 
virtual PxReal getParticleContactOffset () const =0
 Return the particle contact offset.
 
virtual void setSolidRestOffset (PxReal solidRestOffset)=0
 Set the solid rest offset.
 
virtual PxReal getSolidRestOffset () const =0
 Return the solid rest offset.
 
virtual void addRigidAttachment (PxRigidActor *actor)=0
 Creates a rigid attachment between a particle and a rigid actor.
 
virtual void removeRigidAttachment (PxRigidActor *actor)=0
 Removes a rigid attachment between a particle and a rigid body.
 
virtual void enableCCD (bool enable)=0
 Enable continuous collision detection for particles.
 
virtual PxU32 createPhase (PxParticleMaterial *material, PxParticlePhaseFlags flags)=0
 Creates combined particle flag with particle material and particle phase flags.
 
virtual PxU32 getNbParticleMaterials () const =0
 Returns number of particle materials.
 
virtual void setParticleSystemCallback (PxParticleSystemCallback *callback)=0
 Sets a user notify object which receives special simulation events when they occur.
 
virtual PxParticleSystemCallback * getParticleSystemCallback () const =0
 Retrieves the simulationEventCallback pointer set with setSimulationEventCallback().
 
virtual void setPeriodicBoundary (const PxVec3 &boundary)=0
 Sets periodic boundary wrap value.
 
virtual PxVec3 getPeriodicBoundary () const =0
 Gets periodic boundary wrap value.
 
virtual void addParticleBuffer (PxParticleBuffer *particleBuffer)=0
 Add an existing particle buffer to the particle system.
 
virtual void removeParticleBuffer (PxParticleBuffer *particleBuffer)=0
 Remove particle buffer from the particle system.
 
virtual PxU32 getGpuParticleSystemIndex ()=0
 Returns the GPU particle system index.
 
- Public Member Functions inherited from physx::PxActor
virtual void release ()=0
 Deletes the actor.
 
virtual PxActorType::Enum getType () const =0
 Retrieves the type of actor.
 
virtual PxScene * getScene () const =0
 Retrieves the scene which this actor belongs to.
 
virtual void setName (const char *name)=0
 Sets a name string for the object that can be retrieved with getName().
 
virtual const char * getName () const =0
 Retrieves the name string set with setName().
 
virtual PxBounds3 getWorldBounds (float inflation=1.01f) const =0
 Retrieves the axis aligned bounding box enclosing the actor.
 
virtual void setActorFlag (PxActorFlag::Enum flag, bool value)=0
 Raises or clears a particular actor flag.
 
virtual void setActorFlags (PxActorFlags inFlags)=0
 Sets the actor flags.
 
virtual PxActorFlags getActorFlags () const =0
 Reads the PxActor flags.
 
virtual void setDominanceGroup (PxDominanceGroup dominanceGroup)=0
 Assigns dynamic actors a dominance group identifier.
 
virtual PxDominanceGroup getDominanceGroup () const =0
 Retrieves the value set with setDominanceGroup().
 
virtual void setOwnerClient (PxClientID inClient)=0
 Sets the owner client of an actor.
 
virtual PxClientID getOwnerClient () const =0
 Returns the owner client that was specified at creation time.
 
virtual PxAggregate * getAggregate () const =0
 Retrieves the aggregate the actor might be a part of.
 
- Public Member Functions inherited from physx::PxBase
virtual const char * getConcreteTypeName () const =0
 Returns string name of dynamic type.
 
template<class T >
T * is ()
 
template<class T >
const T * is () const
 
PX_FORCE_INLINE PxType getConcreteType () const
 Returns concrete type of object.
 
PX_FORCE_INLINE void setBaseFlag (PxBaseFlag::Enum flag, bool value)
 Set PxBaseFlag

 
PX_FORCE_INLINE void setBaseFlags (PxBaseFlags inFlags)
 Set PxBaseFlags

 
PX_FORCE_INLINE PxBaseFlags getBaseFlags () const
 Returns PxBaseFlags.
 
virtual bool isReleasable () const
 Whether the object is subordinate.
 

Protected Member Functions

PX_INLINE PxParticleSystem (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxParticleSystem (PxBaseFlags baseFlags)
 
virtual bool isKindOf (const char *name) const PX_OVERRIDE
 Returns whether a given type name matches with the type of this instance.
 
- Protected Member Functions inherited from physx::PxActor
PX_INLINE PxActor (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxActor (PxBaseFlags baseFlags)
 
- Protected Member Functions inherited from physx::PxBase
PX_INLINE PxBase (PxType concreteType, PxBaseFlags baseFlags)
 Constructor setting concrete type and base flags.
 
PX_INLINE PxBase (PxBaseFlags baseFlags)
 Deserialization constructor setting base flags.
 
virtual ~PxBase ()
 Destructor.
 
template<class T >
bool typeMatch () const
 

Additional Inherited Members

- Public Attributes inherited from physx::PxActor
void * userData
 user can assign this to whatever, usually to create a 1:1 relationship with a user object.
 
- Protected Attributes inherited from physx::PxBase
PxType mConcreteType
 
PxBaseFlags mBaseFlags
 
PxU32 mBuiltInRefCount
 

Detailed Description

The shared base class for all particle systems.

A particle system simulates a bunch of particles that interact with each other. The interactions can be simple collisions with friction (granular material) ore more complex like fluid interactions, cloth, inflatables etc.

Member Function Documentation

◆ addParticleBuffer()

virtual void physx::PxParticleSystem::addParticleBuffer ( PxParticleBuffer *  particleBuffer)
pure virtual

Add an existing particle buffer to the particle system.

Parameters
[in]particleBuffera PxParticleBuffer*.

See #PxParticleBuffer.

◆ addRigidAttachment()

virtual void physx::PxParticleSystem::addRigidAttachment ( PxRigidActor *  actor)
pure virtual

Creates a rigid attachment between a particle and a rigid actor.

This method creates a symbolic attachment between the particle system and a rigid body for the purpose of island management. The actual attachments will be contained in the particle buffers.

Be aware that destroying the rigid body before destroying the attachment is illegal and may cause a crash. The particle system keeps track of these attachments but the rigid body does not.

Parameters
[in]actorThe rigid actor used for the attachment

◆ createPhase()

virtual PxU32 physx::PxParticleSystem::createPhase ( PxParticleMaterial *  material,
PxParticlePhaseFlags  flags 
)
pure virtual

Creates combined particle flag with particle material and particle phase flags.

Parameters
[in]materialA material instance to associate with the new particle group.
[in]flagsThe particle phase flags.
Returns
The combined particle group index and phase flags.

See #PxParticlePhaseFlag

◆ enableCCD()

virtual void physx::PxParticleSystem::enableCCD ( bool  enable)
pure virtual

Enable continuous collision detection for particles.

Parameters
[in]enableBoolean indicates whether continuous collision detection is enabled.

◆ getContactOffset()

virtual PxReal physx::PxParticleSystem::getContactOffset ( ) const
pure virtual

Return the contact offset.

Returns
the contact offset

See setContactOffset()

◆ getCudaContextManager()

virtual PxCudaContextManager * physx::PxParticleSystem::getCudaContextManager ( ) const
pure virtual

Return the cuda context manager.

Returns
The cuda context manager

◆ getGpuParticleSystemIndex()

virtual PxU32 physx::PxParticleSystem::getGpuParticleSystemIndex ( )
pure virtual

Returns the GPU particle system index.

Returns
The GPU index, if the particle system is in a scene and PxSceneFlag::eSUPPRESS_READBACK is set, or 0xFFFFFFFF otherwise.

◆ getMaxDepenetrationVelocity()

virtual PxReal physx::PxParticleSystem::getMaxDepenetrationVelocity ( )
pure virtual

Retrieves maximal depenetration velocity a particle can have.

Returns
The maximal depenetration velocity

◆ getMaxVelocity()

virtual PxReal physx::PxParticleSystem::getMaxVelocity ( )
pure virtual

Retrieves maximal velocity a particle can have.

Returns
The maximal velocity

◆ getNbParticleMaterials()

virtual PxU32 physx::PxParticleSystem::getNbParticleMaterials ( ) const
pure virtual

Returns number of particle materials.

Returns
The number of particle materials

◆ getParticleContactOffset()

virtual PxReal physx::PxParticleSystem::getParticleContactOffset ( ) const
pure virtual

Return the particle contact offset.

Returns
the particle contact offset

See setParticleContactOffset()

◆ getParticleFlags()

virtual PxParticleFlags physx::PxParticleSystem::getParticleFlags ( ) const
pure virtual

Retrieves the particle flags.

Returns
The particle flags

◆ getParticleSystemCallback()

virtual PxParticleSystemCallback * physx::PxParticleSystem::getParticleSystemCallback ( ) const
pure virtual

Retrieves the simulationEventCallback pointer set with setSimulationEventCallback().

Returns
The current user notify pointer. See PxSimulationEventCallback.

See #PxParticleSystemCallback, setParticleSystemCallback()

◆ getPeriodicBoundary()

virtual PxVec3 physx::PxParticleSystem::getPeriodicBoundary ( ) const
pure virtual

Gets periodic boundary wrap value.

Returns
boundary The periodic boundary wrap value

See setPeriodicBoundary()

◆ getRestOffset()

virtual PxReal physx::PxParticleSystem::getRestOffset ( ) const
pure virtual

Return the rest offset.

Returns
the rest offset

See setRestOffset()

◆ getSimulationFilterData()

virtual PxFilterData physx::PxParticleSystem::getSimulationFilterData ( ) const
pure virtual

Retrieves the collision filter settings.

Returns
The filter data

◆ getSolidRestOffset()

virtual PxReal physx::PxParticleSystem::getSolidRestOffset ( ) const
pure virtual

Return the solid rest offset.

Returns
the solid rest offset

See setSolidRestOffset()

◆ getSolverIterationCounts()

virtual void physx::PxParticleSystem::getSolverIterationCounts ( PxU32 &  minPositionIters,
PxU32 &  minVelocityIters 
) const
pure virtual

Retrieves the solver iteration counts.

See setSolverIterationCounts()

◆ isKindOf()

virtual bool physx::PxParticleSystem::isKindOf ( const char *  superClass) const
inlineprotectedvirtual

Returns whether a given type name matches with the type of this instance.

Reimplemented from physx::PxActor.

Reimplemented in physx::PxPBDParticleSystem.

◆ removeParticleBuffer()

virtual void physx::PxParticleSystem::removeParticleBuffer ( PxParticleBuffer *  particleBuffer)
pure virtual

Remove particle buffer from the particle system.

Parameters
[in]particleBuffera PxParticleBuffer*.

See #PxParticleBuffer.

◆ removeRigidAttachment()

virtual void physx::PxParticleSystem::removeRigidAttachment ( PxRigidActor *  actor)
pure virtual

Removes a rigid attachment between a particle and a rigid body.

This method destroys a symbolic attachment between the particle system and a rigid body for the purpose of island management.

Be aware that destroying the rigid body before destroying the attachment is illegal and may cause a crash. The particle system keeps track of these attachments but the rigid body does not.

Parameters
[in]actorThe rigid body actor used for the attachment

◆ setContactOffset()

virtual void physx::PxParticleSystem::setContactOffset ( PxReal  contactOffset)
pure virtual

Set the contact offset for the collision between particles and rigids or soft bodies.

The contact offset needs to be larger than the rest offset. Contact constraints are generated for a particle and a rigid or softbody below the distance equal to the sum of their contacOffset values.

Parameters
[in]contactOffsetRange: (restOffset, PX_MAX_F32)

◆ setMaxDepenetrationVelocity()

virtual void physx::PxParticleSystem::setMaxDepenetrationVelocity ( PxReal  maxDepenetrationVelocity)
pure virtual

Set the maximal depenetration velocity particles can reach.

Allows to limit the particles' maximal depenetration velocity to avoid that collision responses lead to very high particle velocities

Parameters
[in]maxDepenetrationVelocityThe maximal depenetration velocity

◆ setMaxVelocity()

virtual void physx::PxParticleSystem::setMaxVelocity ( PxReal  maxVelocity)
pure virtual

Set the maximal velocity particles can reach.

Allows to limit the particles' maximal velocity to control the maximal distance a particle can move per frame

Parameters
[in]maxVelocityThe maximal velocity

◆ setParticleContactOffset()

virtual void physx::PxParticleSystem::setParticleContactOffset ( PxReal  particleContactOffset)
pure virtual

Set the contact offset for the interactions between particles.

The particle contact offset needs to be larger than the fluid rest offset and larger than the solid rest offset. Interactions for two particles are computed if their distance is below twice the particleContactOffset value.

Parameters
[in]particleContactOffsetRange: (Max(solidRestOffset, fluidRestOffset), PX_MAX_F32)

◆ setParticleFlag()

virtual void physx::PxParticleSystem::setParticleFlag ( PxParticleFlag::Enum  flag,
bool  val 
)
pure virtual

Set particle flag.

Allows to control self collision etc.

Parameters
[in]flagThe flag to set
[in]valThe new value of the flag

◆ setParticleFlags()

virtual void physx::PxParticleSystem::setParticleFlags ( PxParticleFlags  flags)
pure virtual

Set particle flags.

Allows to control self collision etc.

Parameters
[in]flagsThe flags to set

◆ setParticleSystemCallback()

virtual void physx::PxParticleSystem::setParticleSystemCallback ( PxParticleSystemCallback *  callback)
pure virtual

Sets a user notify object which receives special simulation events when they occur.

Note
Do not set the callback while the simulation is running. Calls to this method while the simulation is running will be ignored.
A call to fetchResultsParticleSystem() on the PxScene will synchronize the work such that the caller knows that all worke done in the callback completed.
Parameters
[in]callbackUser notification callback. See PxSimulationEventCallback.

See #PxParticleSystemCallback, getParticleSystemCallback()

◆ setPeriodicBoundary()

virtual void physx::PxParticleSystem::setPeriodicBoundary ( const PxVec3 &  boundary)
pure virtual

Sets periodic boundary wrap value.

Parameters
[in]boundaryThe periodic boundary wrap value

See getPeriodicBoundary()

◆ setRestOffset()

virtual void physx::PxParticleSystem::setRestOffset ( PxReal  restOffset)
pure virtual

Set the rest offset for the collision between particles and rigids or soft bodies.

A particle and a rigid or soft body will come to rest at a distance equal to the sum of their restOffset values.

Parameters
[in]restOffsetRange: (0, contactOffset)

◆ setSimulationFilterData()

virtual void physx::PxParticleSystem::setSimulationFilterData ( const PxFilterData &  data)
pure virtual

Set collision filter settings.

Allows to control with which objects the particle system collides

Parameters
[in]dataThe filter data

◆ setSolidRestOffset()

virtual void physx::PxParticleSystem::setSolidRestOffset ( PxReal  solidRestOffset)
pure virtual

Set the solid rest offset.

Two solid particles (or a solid and a fluid particle) will come to rest at a distance equal to twice the solidRestOffset value.

Parameters
[in]solidRestOffsetRange: (0, particleContactOffset)

◆ setSolverIterationCounts()

virtual void physx::PxParticleSystem::setSolverIterationCounts ( PxU32  minPositionIters,
PxU32  minVelocityIters = 1 
)
pure virtual

Sets the solver iteration counts for the body.

The solver iteration count determines how accurately joints and contacts are resolved. If you are having trouble with jointed bodies oscillating and behaving erratically, then setting a higher position iteration count may improve their stability.

If intersecting bodies are being depenetrated too violently, increase the number of velocity iterations. More velocity iterations will drive the relative exit velocity of the intersecting objects closer to the correct value given the restitution.

Default: 4 position iterations, 1 velocity iteration

Parameters
[in]minPositionItersNumber of position iterations the solver should perform for this body. Range: [1,255]
[in]minVelocityItersNumber of velocity iterations the solver should perform for this body. Range: [1,255]

See getSolverIterationCounts()


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