1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
\r
2 // This file is part of the "Irrlicht Engine".
\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
\r
5 #ifndef __I_PARTICLE_AFFECTOR_H_INCLUDED__
\r
6 #define __I_PARTICLE_AFFECTOR_H_INCLUDED__
\r
8 #include "IAttributeExchangingObject.h"
\r
9 #include "SParticle.h"
\r
16 //! Types of built in particle affectors
\r
17 enum E_PARTICLE_AFFECTOR_TYPE
\r
28 //! Names for built in particle affectors
\r
29 const c8* const ParticleAffectorTypeNames[] =
\r
40 //! A particle affector modifies particles.
\r
41 class IParticleAffector : public virtual io::IAttributeExchangingObject
\r
46 IParticleAffector() : Enabled(true) {}
\r
48 //! Affects an array of particles.
\r
49 /** \param now Current time. (Same as ITimer::getTime() would return)
\r
50 \param particlearray Array of particles.
\r
51 \param count Amount of particles in array. */
\r
52 virtual void affect(u32 now, SParticle* particlearray, u32 count) = 0;
\r
54 //! Sets whether or not the affector is currently enabled.
\r
55 virtual void setEnabled(bool enabled) { Enabled = enabled; }
\r
57 //! Gets whether or not the affector is currently enabled.
\r
58 virtual bool getEnabled() const { return Enabled; }
\r
60 //! Get emitter type
\r
61 virtual E_PARTICLE_AFFECTOR_TYPE getType() const = 0;
\r
67 } // end namespace scene
\r
68 } // end namespace irr
\r