aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/include/IParticleEmitter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/include/IParticleEmitter.h')
-rw-r--r--src/others/irrlicht-1.8.1/include/IParticleEmitter.h129
1 files changed, 129 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/include/IParticleEmitter.h b/src/others/irrlicht-1.8.1/include/IParticleEmitter.h
new file mode 100644
index 0000000..4b88266
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/include/IParticleEmitter.h
@@ -0,0 +1,129 @@
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_EMITTER_H_INCLUDED__
6#define __I_PARTICLE_EMITTER_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 emitters
17enum E_PARTICLE_EMITTER_TYPE
18{
19 EPET_POINT = 0,
20 EPET_ANIMATED_MESH,
21 EPET_BOX,
22 EPET_CYLINDER,
23 EPET_MESH,
24 EPET_RING,
25 EPET_SPHERE,
26 EPET_COUNT
27};
28
29//! Names for built in particle emitters
30const c8* const ParticleEmitterTypeNames[] =
31{
32 "Point",
33 "AnimatedMesh",
34 "Box",
35 "Cylinder",
36 "Mesh",
37 "Ring",
38 "Sphere",
39 0
40};
41
42//! A particle emitter for using with particle systems.
43/** A Particle emitter emitts new particles into a particle system.
44*/
45class IParticleEmitter : public virtual io::IAttributeExchangingObject
46{
47public:
48
49 //! Prepares an array with new particles to emitt into the system
50 /** \param now Current time.
51 \param timeSinceLastCall Time elapsed since last call, in milliseconds.
52 \param outArray Pointer which will point to the array with the new
53 particles to add into the system.
54 \return Amount of new particles in the array. Can be 0. */
55 virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray) = 0;
56
57 //! Set direction the emitter emits particles
58 virtual void setDirection( const core::vector3df& newDirection ) = 0;
59
60 //! Set minimum number of particles the emitter emits per second
61 virtual void setMinParticlesPerSecond( u32 minPPS ) = 0;
62
63 //! Set maximum number of particles the emitter emits per second
64 virtual void setMaxParticlesPerSecond( u32 maxPPS ) = 0;
65
66 //! Set minimum starting color for particles
67 virtual void setMinStartColor( const video::SColor& color ) = 0;
68
69 //! Set maximum starting color for particles
70 virtual void setMaxStartColor( const video::SColor& color ) = 0;
71
72 //! Set the maximum starting size for particles
73 virtual void setMaxStartSize( const core::dimension2df& size ) = 0;
74
75 //! Set the minimum starting size for particles
76 virtual void setMinStartSize( const core::dimension2df& size ) = 0;
77
78 //! Set the minimum particle life-time in milliseconds
79 virtual void setMinLifeTime( u32 lifeTimeMin ) = 0;
80
81 //! Set the maximum particle life-time in milliseconds
82 virtual void setMaxLifeTime( u32 lifeTimeMax ) = 0;
83
84 //! Set maximal random derivation from the direction
85 virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) = 0;
86
87 //! Get direction the emitter emits particles
88 virtual const core::vector3df& getDirection() const = 0;
89
90 //! Get the minimum number of particles the emitter emits per second
91 virtual u32 getMinParticlesPerSecond() const = 0;
92
93 //! Get the maximum number of particles the emitter emits per second
94 virtual u32 getMaxParticlesPerSecond() const = 0;
95
96 //! Get the minimum starting color for particles
97 virtual const video::SColor& getMinStartColor() const = 0;
98
99 //! Get the maximum starting color for particles
100 virtual const video::SColor& getMaxStartColor() const = 0;
101
102 //! Get the maximum starting size for particles
103 virtual const core::dimension2df& getMaxStartSize() const = 0;
104
105 //! Get the minimum starting size for particles
106 virtual const core::dimension2df& getMinStartSize() const = 0;
107
108 //! Get the minimum particle life-time in milliseconds
109 virtual u32 getMinLifeTime() const = 0;
110
111 //! Get the maximum particle life-time in milliseconds
112 virtual u32 getMaxLifeTime() const = 0;
113
114 //! Get maximal random derivation from the direction
115 virtual s32 getMaxAngleDegrees() const = 0;
116
117
118 //! Get emitter type
119 virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_POINT; }
120};
121
122typedef IParticleEmitter IParticlePointEmitter;
123
124} // end namespace scene
125} // end namespace irr
126
127
128#endif
129