aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/include/IParticleAffector.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/include/IParticleAffector.h')
-rw-r--r--src/others/irrlicht-1.8.1/include/IParticleAffector.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/include/IParticleAffector.h b/src/others/irrlicht-1.8.1/include/IParticleAffector.h
new file mode 100644
index 0000000..e2b83e8
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/include/IParticleAffector.h
@@ -0,0 +1,72 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __I_PARTICLE_AFFECTOR_H_INCLUDED__
6#define __I_PARTICLE_AFFECTOR_H_INCLUDED__
7
8#include "IAttributeExchangingObject.h"
9#include "SParticle.h"
10
11namespace irr
12{
13namespace scene
14{
15
16//! Types of built in particle affectors
17enum E_PARTICLE_AFFECTOR_TYPE
18{
19 EPAT_NONE = 0,
20 EPAT_ATTRACT,
21 EPAT_FADE_OUT,
22 EPAT_GRAVITY,
23 EPAT_ROTATE,
24 EPAT_SCALE,
25 EPAT_COUNT
26};
27
28//! Names for built in particle affectors
29const c8* const ParticleAffectorTypeNames[] =
30{
31 "None",
32 "Attract",
33 "FadeOut",
34 "Gravity",
35 "Rotate",
36 "Scale",
37 0
38};
39
40//! A particle affector modifies particles.
41class IParticleAffector : public virtual io::IAttributeExchangingObject
42{
43public:
44
45 //! constructor
46 IParticleAffector() : Enabled(true) {}
47
48 //! Affects an array of particles.
49 /** \param now Current time. (Same as ITimer::getTime() would return)
50 \param particlearray Array of particles.
51 \param count Amount of particles in array. */
52 virtual void affect(u32 now, SParticle* particlearray, u32 count) = 0;
53
54 //! Sets whether or not the affector is currently enabled.
55 virtual void setEnabled(bool enabled) { Enabled = enabled; }
56
57 //! Gets whether or not the affector is currently enabled.
58 virtual bool getEnabled() const { return Enabled; }
59
60 //! Get emitter type
61 virtual E_PARTICLE_AFFECTOR_TYPE getType() const = 0;
62
63protected:
64 bool Enabled;
65};
66
67} // end namespace scene
68} // end namespace irr
69
70
71#endif
72