|
RavEngine
|
The shared base class for all particle systems. More...
#include <PxParticleSystem.h>
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 |
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.
|
pure virtual |
Add an existing particle buffer to the particle system.
| [in] | particleBuffer | a PxParticleBuffer*. |
See #PxParticleBuffer.
|
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.
| [in] | actor | The rigid actor used for the attachment |
|
pure virtual |
Creates combined particle flag with particle material and particle phase flags.
| [in] | material | A material instance to associate with the new particle group. |
| [in] | flags | The particle phase flags. |
See #PxParticlePhaseFlag
|
pure virtual |
Enable continuous collision detection for particles.
| [in] | enable | Boolean indicates whether continuous collision detection is enabled. |
|
pure virtual |
|
pure virtual |
Return the cuda context manager.
|
pure virtual |
Returns the GPU particle system index.
|
pure virtual |
Retrieves maximal depenetration velocity a particle can have.
|
pure virtual |
Retrieves maximal velocity a particle can have.
|
pure virtual |
Returns number of particle materials.
|
pure virtual |
Return the particle contact offset.
|
pure virtual |
Retrieves the particle flags.
|
pure virtual |
Retrieves the simulationEventCallback pointer set with setSimulationEventCallback().
See #PxParticleSystemCallback, setParticleSystemCallback()
|
pure virtual |
Gets periodic boundary wrap value.
|
pure virtual |
|
pure virtual |
Retrieves the collision filter settings.
|
pure virtual |
|
pure virtual |
Retrieves the solver iteration counts.
|
inlineprotectedvirtual |
Returns whether a given type name matches with the type of this instance.
Reimplemented from physx::PxActor.
Reimplemented in physx::PxPBDParticleSystem.
|
pure virtual |
Remove particle buffer from the particle system.
| [in] | particleBuffer | a PxParticleBuffer*. |
See #PxParticleBuffer.
|
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.
| [in] | actor | The rigid body actor used for the attachment |
|
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.
| [in] | contactOffset | Range: (restOffset, PX_MAX_F32) |
|
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
| [in] | maxDepenetrationVelocity | The maximal depenetration velocity |
|
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
| [in] | maxVelocity | The maximal velocity |
|
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.
| [in] | particleContactOffset | Range: (Max(solidRestOffset, fluidRestOffset), PX_MAX_F32) |
|
pure virtual |
Set particle flag.
Allows to control self collision etc.
| [in] | flag | The flag to set |
| [in] | val | The new value of the flag |
|
pure virtual |
Set particle flags.
Allows to control self collision etc.
| [in] | flags | The flags to set |
|
pure virtual |
Sets a user notify object which receives special simulation events when they occur.
| [in] | callback | User notification callback. See PxSimulationEventCallback. |
See #PxParticleSystemCallback, getParticleSystemCallback()
|
pure virtual |
Sets periodic boundary wrap value.
| [in] | boundary | The periodic boundary wrap value |
|
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.
| [in] | restOffset | Range: (0, contactOffset) |
|
pure virtual |
Set collision filter settings.
Allows to control with which objects the particle system collides
| [in] | data | The filter data |
|
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.
| [in] | solidRestOffset | Range: (0, particleContactOffset) |
|
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