diff options
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CParticleCylinderEmitter.h')
-rw-r--r-- | libraries/irrlicht-1.8/source/Irrlicht/CParticleCylinderEmitter.h | 328 |
1 files changed, 164 insertions, 164 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CParticleCylinderEmitter.h b/libraries/irrlicht-1.8/source/Irrlicht/CParticleCylinderEmitter.h index 3b0fe41..4463cb0 100644 --- a/libraries/irrlicht-1.8/source/Irrlicht/CParticleCylinderEmitter.h +++ b/libraries/irrlicht-1.8/source/Irrlicht/CParticleCylinderEmitter.h | |||
@@ -1,164 +1,164 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __C_PARTICLE_CYLINDER_EMITTER_H_INCLUDED__ | 5 | #ifndef __C_PARTICLE_CYLINDER_EMITTER_H_INCLUDED__ |
6 | #define __C_PARTICLE_CYLINDER_EMITTER_H_INCLUDED__ | 6 | #define __C_PARTICLE_CYLINDER_EMITTER_H_INCLUDED__ |
7 | 7 | ||
8 | #include "IParticleCylinderEmitter.h" | 8 | #include "IParticleCylinderEmitter.h" |
9 | #include "irrArray.h" | 9 | #include "irrArray.h" |
10 | 10 | ||
11 | namespace irr | 11 | namespace irr |
12 | { | 12 | { |
13 | namespace scene | 13 | namespace scene |
14 | { | 14 | { |
15 | 15 | ||
16 | //! A default box emitter | 16 | //! A default box emitter |
17 | class CParticleCylinderEmitter : public IParticleCylinderEmitter | 17 | class CParticleCylinderEmitter : public IParticleCylinderEmitter |
18 | { | 18 | { |
19 | public: | 19 | public: |
20 | 20 | ||
21 | //! constructor | 21 | //! constructor |
22 | CParticleCylinderEmitter( | 22 | CParticleCylinderEmitter( |
23 | const core::vector3df& center, f32 radius, | 23 | const core::vector3df& center, f32 radius, |
24 | const core::vector3df& normal, f32 length, | 24 | const core::vector3df& normal, f32 length, |
25 | bool outlineOnly = false, const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), | 25 | bool outlineOnly = false, const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), |
26 | u32 minParticlesPerSecond = 20, | 26 | u32 minParticlesPerSecond = 20, |
27 | u32 maxParticlesPerSecond = 40, | 27 | u32 maxParticlesPerSecond = 40, |
28 | const video::SColor& minStartColor = video::SColor(255,0,0,0), | 28 | const video::SColor& minStartColor = video::SColor(255,0,0,0), |
29 | const video::SColor& maxStartColor = video::SColor(255,255,255,255), | 29 | const video::SColor& maxStartColor = video::SColor(255,255,255,255), |
30 | u32 lifeTimeMin=2000, | 30 | u32 lifeTimeMin=2000, |
31 | u32 lifeTimeMax=4000, | 31 | u32 lifeTimeMax=4000, |
32 | s32 maxAngleDegrees=0, | 32 | s32 maxAngleDegrees=0, |
33 | const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), | 33 | const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), |
34 | const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) | 34 | const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) |
35 | ); | 35 | ); |
36 | 36 | ||
37 | //! Prepares an array with new particles to emitt into the system | 37 | //! Prepares an array with new particles to emitt into the system |
38 | //! and returns how much new particles there are. | 38 | //! and returns how much new particles there are. |
39 | virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray); | 39 | virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray); |
40 | 40 | ||
41 | //! Set the center of the radius for the cylinder, at one end of the cylinder | 41 | //! Set the center of the radius for the cylinder, at one end of the cylinder |
42 | virtual void setCenter( const core::vector3df& center ) { Center = center; } | 42 | virtual void setCenter( const core::vector3df& center ) { Center = center; } |
43 | 43 | ||
44 | //! Set the normal of the cylinder | 44 | //! Set the normal of the cylinder |
45 | virtual void setNormal( const core::vector3df& normal ) { Normal = normal; } | 45 | virtual void setNormal( const core::vector3df& normal ) { Normal = normal; } |
46 | 46 | ||
47 | //! Set the radius of the cylinder | 47 | //! Set the radius of the cylinder |
48 | virtual void setRadius( f32 radius ) { Radius = radius; } | 48 | virtual void setRadius( f32 radius ) { Radius = radius; } |
49 | 49 | ||
50 | //! Set the length of the cylinder | 50 | //! Set the length of the cylinder |
51 | virtual void setLength( f32 length ) { Length = length; } | 51 | virtual void setLength( f32 length ) { Length = length; } |
52 | 52 | ||
53 | //! Set whether or not to draw points inside the cylinder | 53 | //! Set whether or not to draw points inside the cylinder |
54 | virtual void setOutlineOnly( bool outlineOnly ) { OutlineOnly = outlineOnly; } | 54 | virtual void setOutlineOnly( bool outlineOnly ) { OutlineOnly = outlineOnly; } |
55 | 55 | ||
56 | //! Set direction the emitter emits particles | 56 | //! Set direction the emitter emits particles |
57 | virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } | 57 | virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } |
58 | 58 | ||
59 | //! Set direction the emitter emits particles | 59 | //! Set direction the emitter emits particles |
60 | virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } | 60 | virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } |
61 | 61 | ||
62 | //! Set direction the emitter emits particles | 62 | //! Set direction the emitter emits particles |
63 | virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } | 63 | virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } |
64 | 64 | ||
65 | //! Set direction the emitter emits particles | 65 | //! Set direction the emitter emits particles |
66 | virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } | 66 | virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } |
67 | 67 | ||
68 | //! Set direction the emitter emits particles | 68 | //! Set direction the emitter emits particles |
69 | virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } | 69 | virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } |
70 | 70 | ||
71 | //! Set the maximum starting size for particles | 71 | //! Set the maximum starting size for particles |
72 | virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } | 72 | virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } |
73 | 73 | ||
74 | //! Set the minimum starting size for particles | 74 | //! Set the minimum starting size for particles |
75 | virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } | 75 | virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } |
76 | 76 | ||
77 | //! Set the minimum particle life-time in milliseconds | 77 | //! Set the minimum particle life-time in milliseconds |
78 | virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } | 78 | virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } |
79 | 79 | ||
80 | //! Set the maximum particle life-time in milliseconds | 80 | //! Set the maximum particle life-time in milliseconds |
81 | virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } | 81 | virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } |
82 | 82 | ||
83 | //! Maximal random derivation from the direction | 83 | //! Maximal random derivation from the direction |
84 | virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } | 84 | virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } |
85 | 85 | ||
86 | //! Get the center of the cylinder | 86 | //! Get the center of the cylinder |
87 | virtual const core::vector3df& getCenter() const { return Center; } | 87 | virtual const core::vector3df& getCenter() const { return Center; } |
88 | 88 | ||
89 | //! Get the normal of the cylinder | 89 | //! Get the normal of the cylinder |
90 | virtual const core::vector3df& getNormal() const { return Normal; } | 90 | virtual const core::vector3df& getNormal() const { return Normal; } |
91 | 91 | ||
92 | //! Get the radius of the cylinder | 92 | //! Get the radius of the cylinder |
93 | virtual f32 getRadius() const { return Radius; } | 93 | virtual f32 getRadius() const { return Radius; } |
94 | 94 | ||
95 | //! Get the center of the cylinder | 95 | //! Get the center of the cylinder |
96 | virtual f32 getLength() const { return Length; } | 96 | virtual f32 getLength() const { return Length; } |
97 | 97 | ||
98 | //! Get whether or not to draw points inside the cylinder | 98 | //! Get whether or not to draw points inside the cylinder |
99 | virtual bool getOutlineOnly() const { return OutlineOnly; } | 99 | virtual bool getOutlineOnly() const { return OutlineOnly; } |
100 | 100 | ||
101 | //! Gets direction the emitter emits particles | 101 | //! Gets direction the emitter emits particles |
102 | virtual const core::vector3df& getDirection() const { return Direction; } | 102 | virtual const core::vector3df& getDirection() const { return Direction; } |
103 | 103 | ||
104 | //! Gets direction the emitter emits particles | 104 | //! Gets direction the emitter emits particles |
105 | virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } | 105 | virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } |
106 | 106 | ||
107 | //! Gets direction the emitter emits particles | 107 | //! Gets direction the emitter emits particles |
108 | virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } | 108 | virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } |
109 | 109 | ||
110 | //! Gets direction the emitter emits particles | 110 | //! Gets direction the emitter emits particles |
111 | virtual const video::SColor& getMinStartColor() const { return MinStartColor; } | 111 | virtual const video::SColor& getMinStartColor() const { return MinStartColor; } |
112 | 112 | ||
113 | //! Gets direction the emitter emits particles | 113 | //! Gets direction the emitter emits particles |
114 | virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } | 114 | virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } |
115 | 115 | ||
116 | //! Gets the maximum starting size for particles | 116 | //! Gets the maximum starting size for particles |
117 | virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } | 117 | virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } |
118 | 118 | ||
119 | //! Gets the minimum starting size for particles | 119 | //! Gets the minimum starting size for particles |
120 | virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } | 120 | virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } |
121 | 121 | ||
122 | //! Get the minimum particle life-time in milliseconds | 122 | //! Get the minimum particle life-time in milliseconds |
123 | virtual u32 getMinLifeTime() const { return MinLifeTime; } | 123 | virtual u32 getMinLifeTime() const { return MinLifeTime; } |
124 | 124 | ||
125 | //! Get the maximum particle life-time in milliseconds | 125 | //! Get the maximum particle life-time in milliseconds |
126 | virtual u32 getMaxLifeTime() const { return MaxLifeTime; } | 126 | virtual u32 getMaxLifeTime() const { return MaxLifeTime; } |
127 | 127 | ||
128 | //! Maximal random derivation from the direction | 128 | //! Maximal random derivation from the direction |
129 | virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } | 129 | virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } |
130 | 130 | ||
131 | //! Writes attributes of the object. | 131 | //! Writes attributes of the object. |
132 | virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; | 132 | virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; |
133 | 133 | ||
134 | //! Reads attributes of the object. | 134 | //! Reads attributes of the object. |
135 | virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); | 135 | virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); |
136 | 136 | ||
137 | private: | 137 | private: |
138 | 138 | ||
139 | core::array<SParticle> Particles; | 139 | core::array<SParticle> Particles; |
140 | 140 | ||
141 | core::vector3df Center; | 141 | core::vector3df Center; |
142 | core::vector3df Normal; | 142 | core::vector3df Normal; |
143 | core::vector3df Direction; | 143 | core::vector3df Direction; |
144 | core::dimension2df MaxStartSize, MinStartSize; | 144 | core::dimension2df MaxStartSize, MinStartSize; |
145 | u32 MinParticlesPerSecond, MaxParticlesPerSecond; | 145 | u32 MinParticlesPerSecond, MaxParticlesPerSecond; |
146 | video::SColor MinStartColor, MaxStartColor; | 146 | video::SColor MinStartColor, MaxStartColor; |
147 | u32 MinLifeTime, MaxLifeTime; | 147 | u32 MinLifeTime, MaxLifeTime; |
148 | 148 | ||
149 | f32 Radius; | 149 | f32 Radius; |
150 | f32 Length; | 150 | f32 Length; |
151 | 151 | ||
152 | u32 Time; | 152 | u32 Time; |
153 | u32 Emitted; | 153 | u32 Emitted; |
154 | s32 MaxAngleDegrees; | 154 | s32 MaxAngleDegrees; |
155 | 155 | ||
156 | bool OutlineOnly; | 156 | bool OutlineOnly; |
157 | }; | 157 | }; |
158 | 158 | ||
159 | } // end namespace scene | 159 | } // end namespace scene |
160 | } // end namespace irr | 160 | } // end namespace irr |
161 | 161 | ||
162 | 162 | ||
163 | #endif | 163 | #endif |
164 | 164 | ||