osgParticle::AutoParticleSystemUpdater Class Reference

A useful node class for updating particle systems automatically and that automaticlly destroy them when all particles are dead ; handles ParticleSystems that need to live after their emitter is destroyed. More...

#include <AutoParticleSystemUpdater.h>

List of all members.

Public Member Functions

 AutoParticleSystemUpdater ()
 AutoParticleSystemUpdater (const AutoParticleSystemUpdater &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Node (osgParticle, AutoParticleSystemUpdater)
virtual bool addParticleSystem (ParticleSystem *ps)
 Add a particle system to the list.
virtual bool removeParticleSystem (unsigned int i, unsigned int numParticleSystemsToRemove=1)
 Remove a particle system(s) from the list (by index).
virtual bool setParticleSystem (unsigned int i, ParticleSystem *ps)
 set a particle system by index.
virtual void traverse (osg::NodeVisitor &nv)

Protected Member Functions

virtual ~AutoParticleSystemUpdater ()
AutoParticleSystemUpdateroperator= (const AutoParticleSystemUpdater &)

Protected Attributes

osg::ref_ptr< osg::Geode > pGeode

Private Types

typedef std::vector< bool > ParticleSystemData_Vector

Private Attributes

ParticleSystemData_Vector _psdata


Detailed Description

A useful node class for updating particle systems automatically and that automaticlly destroy them when all particles are dead ; handles ParticleSystems that need to live after their emitter is destroyed.

For example, destroyed units that are smoking/in fire should use this. AutoParticleSystemUpdater is almost like the osgParticle::ParticleSystemUpdater; it only adds auto-deletion. You should place this updater AFTER other nodes like emitters and programs.

Author:
Sukender
Version:
2 Replaced the inital ParticleSystemUpdater copy by a derivation, since OSG now has enough virtual mehtods (Since revision 9202).

Definition at line 45 of file AutoParticleSystemUpdater.h.


Member Typedef Documentation

Definition at line 69 of file AutoParticleSystemUpdater.h.


Constructor & Destructor Documentation

osgParticle::AutoParticleSystemUpdater::AutoParticleSystemUpdater (  ) 

Definition at line 44 of file AutoParticleSystemUpdater.cpp.

References pGeode.

osgParticle::AutoParticleSystemUpdater::AutoParticleSystemUpdater ( const AutoParticleSystemUpdater copy,
const osg::CopyOp &  copyop = osg::CopyOp::SHALLOW_COPY 
)

Definition at line 48 of file AutoParticleSystemUpdater.cpp.

References _psdata.

virtual osgParticle::AutoParticleSystemUpdater::~AutoParticleSystemUpdater (  )  [inline, protected, virtual]

Definition at line 64 of file AutoParticleSystemUpdater.h.


Member Function Documentation

bool osgParticle::AutoParticleSystemUpdater::addParticleSystem ( ParticleSystem *  ps  )  [virtual]

Add a particle system to the list.

Definition at line 57 of file AutoParticleSystemUpdater.cpp.

References _psdata, ASSERT, and pGeode.

osgParticle::AutoParticleSystemUpdater::META_Node ( osgParticle  ,
AutoParticleSystemUpdater   
)

AutoParticleSystemUpdater& osgParticle::AutoParticleSystemUpdater::operator= ( const AutoParticleSystemUpdater  )  [inline, protected]

Definition at line 65 of file AutoParticleSystemUpdater.h.

bool osgParticle::AutoParticleSystemUpdater::removeParticleSystem ( unsigned int  i,
unsigned int  numParticleSystemsToRemove = 1 
) [virtual]

Remove a particle system(s) from the list (by index).

Definition at line 66 of file AutoParticleSystemUpdater.cpp.

References _psdata, and ASSERT.

Referenced by traverse().

bool osgParticle::AutoParticleSystemUpdater::setParticleSystem ( unsigned int  i,
ParticleSystem *  ps 
) [virtual]

set a particle system by index.

Definition at line 78 of file AutoParticleSystemUpdater.cpp.

References _psdata, and ASSERT.

void osgParticle::AutoParticleSystemUpdater::traverse ( osg::NodeVisitor &  nv  )  [virtual]

Definition at line 86 of file AutoParticleSystemUpdater.cpp.

References _psdata, ASSERT, pGeode, and removeParticleSystem().


Member Data Documentation

osg::ref_ptr<osg::Geode> osgParticle::AutoParticleSystemUpdater::pGeode [protected]


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

Generated on Sun Jan 17 11:39:35 2010 for PVLE (Pro-Vocation Light Engine) by  doxygen 1.5.9