Public Member Functions | Protected Member Functions | List of all members
PxParticleSystem Class Reference

The particle system class represents the main module for particle based simulation. More...

#include <PxParticleSystem.h>

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

Public Member Functions

virtual const char * getConcreteTypeName () const
 Returns string name of dynamic type. More...
 
- Public Member Functions inherited from PxParticleBase
virtual void setParticleBaseFlag (PxParticleBaseFlag::Enum flag, bool val)=0
 Sets particle system flags. More...
 
virtual PxParticleBaseFlags getParticleBaseFlags () const =0
 Returns particle system flags. More...
 
virtual PxParticleReadDatalockParticleReadData (PxDataAccessFlags flags)=0
 Locks the particle data and provides the data descriptor for accessing the particles. After reading from the buffers the application needs to call PxParticleReadData::unlock() before any SDK operation can access the buffers. Particularly the buffers need to be unlocked before calling PxParticleBase::lockParticleReadData(), PxParticleBase::createParticles(), PxParticleBase::releaseParticles(), PxScene::fetchResults(). More...
 
virtual PxParticleReadDatalockParticleReadData ()=0
 Locks the particle read data and provides the data descriptor for accessing the particles. More...
 
virtual bool createParticles (const PxParticleCreationData &creationData)=0
 Creates new particles. More...
 
virtual void releaseParticles (PxU32 numParticles, const PxStrideIterator< const PxU32 > &indexBuffer)=0
 Releases particles. More...
 
virtual void releaseParticles ()=0
 Releases all particles. More...
 
virtual void setPositions (PxU32 numParticles, const PxStrideIterator< const PxU32 > &indexBuffer, const PxStrideIterator< const PxVec3 > &positionBuffer)=0
 Sets particle positions. More...
 
virtual void setVelocities (PxU32 numParticles, const PxStrideIterator< const PxU32 > &indexBuffer, const PxStrideIterator< const PxVec3 > &velocityBuffer)=0
 Sets particle velocities. More...
 
virtual void setRestOffsets (PxU32 numParticles, const PxStrideIterator< const PxU32 > &indexBuffer, const PxStrideIterator< const PxF32 > &restOffsetBuffer)=0
 Sets particle rest offsets. More...
 
virtual void addForces (PxU32 numParticles, const PxStrideIterator< const PxU32 > &indexBuffer, const PxStrideIterator< const PxVec3 > &forceBuffer, PxForceMode::Enum forceMode)=0
 Set forces to be applied to the particles when the simulation starts. More...
 
virtual PxReal getDamping () const =0
 Returns the particle system damping. More...
 
virtual void setDamping (PxReal damp)=0
 Sets the particle system damping (must be nonnegative). More...
 
virtual PxVec3 getExternalAcceleration () const =0
 Returns the external acceleration applied to each particle at each time step. More...
 
virtual void setExternalAcceleration (const PxVec3 &acceleration)=0
 Sets the external acceleration applied to each particle at each time step. More...
 
virtual void getProjectionPlane (PxVec3 &normal, PxReal &distance) const =0
 Returns the plane the particles are projected to. More...
 
virtual void setProjectionPlane (const PxVec3 &normal, PxReal distance)=0
 Sets the plane the particles are projected to. More...
 
virtual PxReal getParticleMass () const =0
 Returns the mass of a particle. More...
 
virtual void setParticleMass (PxReal mass)=0
 Sets the mass of a particle. More...
 
virtual PxReal getRestitution () const =0
 Returns the restitution used for collision with shapes. More...
 
virtual void setRestitution (PxReal rest)=0
 Sets the restitution used for collision with shapes. More...
 
virtual PxReal getDynamicFriction () const =0
 Returns the dynamic friction used for collision with shapes. More...
 
virtual void setDynamicFriction (PxReal friction)=0
 Sets the dynamic friction used for collision with shapes. More...
 
virtual PxReal getStaticFriction () const =0
 Returns the static friction used for collision with shapes. More...
 
virtual void setStaticFriction (PxReal friction)=0
 Sets the static friction used for collision with shapes. More...
 
virtual void setSimulationFilterData (const PxFilterData &data)=0
 Sets the user definable collision filter data. More...
 
virtual PxFilterData getSimulationFilterData () const =0
 Retrieves the object's collision filter data. More...
 
virtual PX_DEPRECATED void resetFiltering ()=0
 Marks the object to reset interactions and re-run collision filters in the next simulation step. More...
 
virtual PxU32 getMaxParticles () const =0
 Returns the maximum number of particles for this particle system. More...
 
virtual PxReal getMaxMotionDistance () const =0
 Returns the maximal motion distance (the particle can move the maximal distance of getMaxMotionDistance() during one timestep). More...
 
virtual void setMaxMotionDistance (PxReal distance)=0
 Sets the maximal motion distance (the particle can move the maximal distance during one timestep). Immutable when the particle system is part of a scene. More...
 
virtual PxReal getRestOffset () const =0
 Returns the distance between particles and collision geometry, which is maintained during simulation. More...
 
virtual void setRestOffset (PxReal restOffset)=0
 Sets the distance between particles and collision geometry, which is maintained during simulation. If per particle restOffsets are used, they need to be in the range [0.0f, restOffset]. Immutable when the particle system is part of a scene. More...
 
virtual PxReal getContactOffset () const =0
 Returns the distance at which contacts are generated between particles and collision geometry. More...
 
virtual void setContactOffset (PxReal contactOffset)=0
 Sets the distance at which contacts are generated between particles and collision geometry. Immutable when the particle system is part of a scene. More...
 
virtual PxReal getGridSize () const =0
 Returns the particle grid size used for internal spatial data structures. More...
 
virtual void setGridSize (PxReal gridSize)=0
 Sets the particle grid size used for internal spatial data structures. Immutable when the particle system is part of a scene. The actual grid size used might differ from the grid size set in the setGridSize(). More...
 
virtual PxParticleReadDataFlags getParticleReadDataFlags () const =0
 Returns particle read data flags. More...
 
virtual void setParticleReadDataFlag (PxParticleReadDataFlag::Enum flag, bool val)=0
 Sets particle read data flags. More...
 
- Public Member Functions inherited from PxActor
virtual void release ()=0
 Deletes the actor. More...
 
virtual PxActorType::Enum getType () const =0
 Retrieves the type of actor. More...
 
PX_DEPRECATED PX_INLINE
PxRigidStatic
isRigidStatic ()
 Attempts to cast to specific actor type. More...
 
PX_DEPRECATED PX_INLINE const
PxRigidStatic
isRigidStatic () const
 
PX_DEPRECATED PX_INLINE
PxRigidDynamic
isRigidDynamic ()
 
PX_DEPRECATED PX_INLINE const
PxRigidDynamic
isRigidDynamic () const
 
PX_DEPRECATED PX_INLINE
PxParticleSystem
isParticleSystem ()
 
PX_DEPRECATED PX_INLINE const
PxParticleSystem
isParticleSystem () const
 
PX_DEPRECATED PX_INLINE
PxParticleFluid
isParticleFluid ()
 
PX_DEPRECATED PX_INLINE const
PxParticleFluid
isParticleFluid () const
 
PX_DEPRECATED PX_INLINE
PxArticulationLink
isArticulationLink ()
 
PX_DEPRECATED PX_INLINE const
PxArticulationLink
isArticulationLink () const
 
PX_DEPRECATED PX_INLINE PxClothisCloth ()
 
PX_DEPRECATED PX_INLINE const
PxCloth
isCloth () const
 
PX_DEPRECATED PX_INLINE
PxRigidActor
isRigidActor ()
 
PX_DEPRECATED PX_INLINE const
PxRigidActor
isRigidActor () const
 
PX_DEPRECATED PX_INLINE
PxRigidBody
isRigidBody ()
 
PX_DEPRECATED PX_INLINE const
PxRigidBody
isRigidBody () const
 
PX_DEPRECATED PX_INLINE
PxParticleBase
isParticleBase ()
 
PX_DEPRECATED PX_INLINE const
PxParticleBase
isParticleBase () const
 
virtual PxScenegetScene () const =0
 Retrieves the scene which this actor belongs to. More...
 
virtual void setName (const char *name)=0
 Sets a name string for the object that can be retrieved with getName(). More...
 
virtual const char * getName () const =0
 Retrieves the name string set with setName(). More...
 
virtual PxBounds3 getWorldBounds (float inflation=1.01f) const =0
 Retrieves the axis aligned bounding box enclosing the actor. More...
 
virtual void setActorFlag (PxActorFlag::Enum flag, bool value)=0
 Raises or clears a particular actor flag. More...
 
virtual void setActorFlags (PxActorFlags inFlags)=0
 sets the actor flags More...
 
virtual PxActorFlags getActorFlags () const =0
 Reads the PxActor flags. More...
 
virtual void setDominanceGroup (PxDominanceGroup dominanceGroup)=0
 Assigns dynamic actors a dominance group identifier. More...
 
virtual PxDominanceGroup getDominanceGroup () const =0
 Retrieves the value set with setDominanceGroup(). More...
 
virtual void setOwnerClient (PxClientID inClient)=0
 Sets the owner client of an actor. More...
 
virtual PxClientID getOwnerClient () const =0
 Returns the owner client that was specified with at creation time. More...
 
virtual void setClientBehaviorFlags (PxActorClientBehaviorFlags)=0
 Sets the behavior bits of the actor. More...
 
virtual PxActorClientBehaviorFlags getClientBehaviorFlags () const =0
 Retrieves the behavior bits of the actor. More...
 
virtual PxAggregategetAggregate () const =0
 Retrieves the aggregate the actor might be a part of. More...
 
- Public Member Functions inherited from PxBase
template<class T >
T * is ()
 
template<class T >
const T * is () const
 
PX_INLINE PxType getConcreteType () const
 Returns concrete type of object. More...
 
PX_INLINE void setBaseFlag (PxBaseFlag::Enum flag, bool value)
 Set PxBaseFlag. More...
 
PX_INLINE void setBaseFlags (PxBaseFlags inFlags)
 Set PxBaseFlags. More...
 
PX_INLINE PxBaseFlags getBaseFlags () const
 Returns PxBaseFlags. More...
 
virtual bool isReleasable () const
 Whether the object is subordinate. More...
 

Protected Member Functions

PX_INLINE PxParticleSystem (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxParticleSystem (PxBaseFlags baseFlags)
 
virtual ~PxParticleSystem ()
 
virtual bool isKindOf (const char *name) const
 Returns whether a given type name matches with the type of this instance. More...
 
- Protected Member Functions inherited from PxParticleBase
PX_INLINE PxParticleBase (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxParticleBase (PxBaseFlags baseFlags)
 
virtual ~PxParticleBase ()
 

Additional Inherited Members

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

Detailed Description

The particle system class represents the main module for particle based simulation.

This class inherits the properties of the PxParticleBase class.

The particle system class manages a set of particles. Particles can be created, released and updated directly through the API. When a particle is created the user gets an id for it which can be used to address the particle until it is released again.

Particles collide with static and dynamic shapes. They are also affected by the scene gravity and a user force, as well as global velocity damping. When a particle collides, a particle flag is raised corresponding to the type of actor, static or dynamic, it collided with. Additionally a shape can be flagged as a drain (See PxShapeFlag), in order to get a corresponding particle flag raised when a collision occurs. This information can be used to delete particles.

The particles of a particle system don't collide with each other. In order to simulate particle-particle interactions use the subclass PxParticleFluid.

See Also
PxParticleBase, PxParticleReadData, PxPhysics.createParticleSystem

Constructor & Destructor Documentation

PX_INLINE PxParticleSystem::PxParticleSystem ( PxType  concreteType,
PxBaseFlags  baseFlags 
)
inlineprotected
PX_INLINE PxParticleSystem::PxParticleSystem ( PxBaseFlags  baseFlags)
inlineprotected
virtual PxParticleSystem::~PxParticleSystem ( )
inlineprotectedvirtual

Member Function Documentation

virtual const char* PxParticleSystem::getConcreteTypeName ( ) const
inlinevirtual

Returns string name of dynamic type.

Returns
Class name of most derived type of this object.

Reimplemented from PxBase.

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

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

Reimplemented from PxParticleBase.

References PxParticleBase::isKindOf().


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


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com