OpenSceneGraph
3.0.1
|
An abstract base class for particle emitters. More...
Public Member Functions | |
Emitter () | |
Emitter (const Emitter ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
virtual const char * | libraryName () const |
return the name of the node's library. | |
virtual const char * | className () const |
return the name of the node's class type. | |
virtual bool | isSameKindAs (const osg::Object *obj) const |
return true if this and obj are of the same kind of object. | |
virtual void | accept (osg::NodeVisitor &nv) |
Visitor Pattern : calls the apply method of a NodeVisitor with this node's type. | |
const Particle & | getParticleTemplate () const |
Get the particle template. | |
void | setParticleTemplate (const Particle &p) |
Set the particle template (particle is copied). | |
bool | getUseDefaultTemplate () const |
Return whether the particle system's default template should be used. | |
void | setUseDefaultTemplate (bool v) |
Set whether the default particle template should be used. | |
Protected Member Functions | |
virtual | ~Emitter () |
Emitter & | operator= (const Emitter &) |
void | process (double dt) |
virtual void | emitParticles (double dt)=0 |
Protected Attributes | |
bool | _usedeftemp |
Particle | _ptemp |
An abstract base class for particle emitters.
Descendant classes must override the emitParticles()
method to generate new particles by calling the ParticleSystem::createParticle()
method on the particle system associated to the emitter.
osgParticle::Emitter::Emitter | ( | ) |
osgParticle::Emitter::Emitter | ( | const Emitter & | copy, |
const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
) |
virtual osgParticle::Emitter::~Emitter | ( | ) | [inline, protected, virtual] |
virtual void osgParticle::Emitter::accept | ( | osg::NodeVisitor & | nv | ) | [inline, virtual] |
Visitor Pattern : calls the apply method of a NodeVisitor with this node's type.
Reimplemented from osgParticle::ParticleProcessor.
References osg::NodeVisitor::validNodeMask(), osg::NodeVisitor::pushOntoNodePath(), osg::NodeVisitor::apply(), and osg::NodeVisitor::popFromNodePath().
virtual const char* osgParticle::Emitter::className | ( | ) | const [inline, virtual] |
return the name of the node's class type.
Reimplemented from osgParticle::ParticleProcessor.
virtual void osgParticle::Emitter::emitParticles | ( | double | dt | ) | [protected, pure virtual] |
Implemented in osgParticle::ModularEmitter.
Referenced by process().
const Particle & osgParticle::Emitter::getParticleTemplate | ( | ) | const [inline] |
Get the particle template.
References _ptemp.
bool osgParticle::Emitter::getUseDefaultTemplate | ( | ) | const [inline] |
Return whether the particle system's default template should be used.
References _usedeftemp.
virtual bool osgParticle::Emitter::isSameKindAs | ( | const osg::Object * | obj | ) | const [inline, virtual] |
return true if this and obj are of the same kind of object.
Reimplemented from osgParticle::ParticleProcessor.
virtual const char* osgParticle::Emitter::libraryName | ( | ) | const [inline, virtual] |
return the name of the node's library.
Reimplemented from osgParticle::ParticleProcessor.
void osgParticle::Emitter::process | ( | double | dt | ) | [inline, protected, virtual] |
Implements osgParticle::ParticleProcessor.
References emitParticles().
void osgParticle::Emitter::setParticleTemplate | ( | const Particle & | p | ) | [inline] |
Set the particle template (particle is copied).
References _ptemp, and _usedeftemp.
void osgParticle::Emitter::setUseDefaultTemplate | ( | bool | v | ) | [inline] |
Set whether the default particle template should be used.
When this flag is true, the particle template is ignored, and the particle system's default template is used instead.
References _usedeftemp.
Particle osgParticle::Emitter::_ptemp [protected] |
Referenced by getParticleTemplate(), and setParticleTemplate().
bool osgParticle::Emitter::_usedeftemp [protected] |
Referenced by setParticleTemplate(), getUseDefaultTemplate(), and setUseDefaultTemplate().
![]() | Generated at Mon Oct 3 2011 12:39:48 for the OpenSceneGraph by doxygen 1.7.5. |