1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
14#ifndef OSGPARTICLE_EXPLOSIONEFFECT
15#define OSGPARTICLE_EXPLOSIONEFFECT
17#include <osgParticle/ParticleEffect>
18#include <osgParticle/ModularEmitter>
19#include <osgParticle/FluidProgram>
24 class OSGPARTICLE_EXPORT ExplosionEffect : public ParticleEffect
28 explicit ExplosionEffect(bool automaticSetup=true);
30 ExplosionEffect(const osg::Vec3& position, float scale=1.0f, float intensity=1.0f);
32 ExplosionEffect(const ExplosionEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
34 META_Node(osgParticle,ExplosionEffect);
36 virtual void setDefaults();
38 virtual void setUpEmitterAndProgram();
40 virtual Emitter* getEmitter() { return _emitter.get(); }
41 virtual const Emitter* getEmitter() const { return _emitter.get(); }
43 virtual Program* getProgram() { return _program.get(); }
44 virtual const Program* getProgram() const { return _program.get(); }
48 virtual ~ExplosionEffect() {}
50 osg::ref_ptr<ModularEmitter> _emitter;
51 osg::ref_ptr<FluidProgram> _program;