15#ifndef OSGPARTICLE_PARTICLESYSTEMUPDATER
16#define OSGPARTICLE_PARTICLESYSTEMUPDATER 1
85 typedef std::vector<osg::ref_ptr<ParticleSystem> > ParticleSystem_Vector;
87 ParticleSystem_Vector _psv;
92 unsigned int _frameNumber;
99 return static_cast<int>(_psv.size());
104 return _psv[i].get();
109 return _psv[i].get();
114 for( ParticleSystem_Vector::const_iterator itr=_psv.begin();
118 if( itr->get() == ps )
return true;
125 for(
unsigned int particleSystemNum=0; particleSystemNum<_psv.size(); ++particleSystemNum )
127 if( _psv[particleSystemNum] == ps )
return particleSystemNum;
BoundingSphered BoundingSphere
Definition BoundingSphere:308
The osgParticle library is a NodeKit that extends the core scene graph to support particle effects.
Definition AccelOperator:27
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Base class for all internal nodes in the scene graph.
Definition Node:72
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
The heart of this class library; its purpose is to hold a set of particles and manage particle creati...
Definition ParticleSystem:54
bool containsParticleSystem(const ParticleSystem *ps) const
return true if ParticleSystem is contained within ParticlsSystemUpdater.
Definition ParticleSystemUpdater:112
virtual ~ParticleSystemUpdater()
Definition ParticleSystemUpdater:81
virtual bool replaceParticleSystem(ParticleSystem *origPS, ParticleSystem *newPS)
Replace ParticleSystem with another ParticleSystem.
virtual bool addParticleSystem(ParticleSystem *ps)
Add a particle system to the list.
unsigned int getParticleSystemIndex(const ParticleSystem *ps) const
get index number of ParticleSystem.
Definition ParticleSystemUpdater:123
virtual osg::BoundingSphere computeBound() const
Compute the bounding sphere around Node's geometry or children.
META_Node(osgParticle, ParticleSystemUpdater)
ParticleSystemUpdater(const ParticleSystemUpdater ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
virtual bool removeParticleSystem(unsigned int i, unsigned int numParticleSystemsToRemove=1)
Remove a particle system(s) from the list (by index).
ParticleSystem * getParticleSystem(unsigned int i)
Get a particle system from the list.
Definition ParticleSystemUpdater:102
ParticleSystemUpdater & operator=(const ParticleSystemUpdater &)
Definition ParticleSystemUpdater:82
virtual bool removeParticleSystem(ParticleSystem *ps)
Remove a particle system from the list (by pointer).
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.
Definition ParticleSystemUpdater:97
virtual void traverse(osg::NodeVisitor &nv)
Traverse downwards : calls children's accept method with NodeVisitor.
#define OSGPARTICLE_EXPORT
Definition Export:40