OpenSceneGraph  3.0.1
Public Member Functions | Protected Member Functions
osgParticle::ParticleSystemUpdater Class Reference

A useful node class for updating particle systems automatically. More...

Inheritance diagram for osgParticle::ParticleSystemUpdater:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ParticleSystemUpdater ()
 ParticleSystemUpdater (const ParticleSystemUpdater &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Node (osgParticle, ParticleSystemUpdater)
virtual bool addParticleSystem (ParticleSystem *ps)
 Add a particle system to the list.
virtual bool removeParticleSystem (ParticleSystem *ps)
 Remove a particle system from the list (by pointer).
virtual bool removeParticleSystem (unsigned int i, unsigned int numParticleSystemsToRemove=1)
 Remove a particle system(s) from the list (by index).
virtual bool replaceParticleSystem (ParticleSystem *origPS, ParticleSystem *newPS)
 Replace ParticleSystem with another ParticleSystem.
virtual bool setParticleSystem (unsigned int i, ParticleSystem *ps)
 set a particle system by index.
unsigned int getNumParticleSystems () const
 Return the number of particle systems on the list.
ParticleSystemgetParticleSystem (unsigned int i)
 Get a particle system from the list.
const ParticleSystemgetParticleSystem (unsigned int i) const
 Get a particle system from the list.
bool containsParticleSystem (const ParticleSystem *ps) const
 return true if ParticleSystem is contained within ParticlsSystemUpdater.
unsigned int getParticleSystemIndex (const ParticleSystem *ps) const
 get index number of ParticleSystem.
virtual void traverse (osg::NodeVisitor &nv)
 Traverse downwards : calls children's accept method with NodeVisitor.
virtual osg::BoundingSphere computeBound () const
 Compute the bounding sphere around Node's geometry or children.

Protected Member Functions

virtual ~ParticleSystemUpdater ()
ParticleSystemUpdateroperator= (const ParticleSystemUpdater &)

Detailed Description

A useful node class for updating particle systems automatically.

When a ParticleSystemUpdater is traversed by a cull visitor, it calls the update() method on the specified particle systems. You should place this updater AFTER other nodes like emitters and programs.


Constructor & Destructor Documentation

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

Member Function Documentation

Add a particle system to the list.

Compute the bounding sphere around Node's geometry or children.

This method is automatically called by getBound() when the bounding sphere has been marked dirty via dirtyBound().

Reimplemented from osg::Node.

return true if ParticleSystem is contained within ParticlsSystemUpdater.

Return the number of particle systems on the list.

Get a particle system from the list.

const ParticleSystem * osgParticle::ParticleSystemUpdater::getParticleSystem ( unsigned int  i) const [inline]

Get a particle system from the list.

get index number of ParticleSystem.

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

Remove a particle system from the list (by pointer).

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

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

Replace ParticleSystem with another ParticleSystem.

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

set a particle system by index.

Traverse downwards : calls children's accept method with NodeVisitor.

Reimplemented from osg::Node.


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

osg logo
Generated at Fri Apr 27 2012 20:51:42 for the OpenSceneGraph by doxygen 1.8.0.