aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/CParticleMeshEmitter.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/CParticleMeshEmitter.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CParticleMeshEmitter.h')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/CParticleMeshEmitter.h320
1 files changed, 160 insertions, 160 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CParticleMeshEmitter.h b/libraries/irrlicht-1.8/source/Irrlicht/CParticleMeshEmitter.h
index af00031..c10bfea 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/CParticleMeshEmitter.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/CParticleMeshEmitter.h
@@ -1,160 +1,160 @@
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_MESH_EMITTER_H_INCLUDED__ 5#ifndef __C_PARTICLE_MESH_EMITTER_H_INCLUDED__
6#define __C_PARTICLE_MESH_EMITTER_H_INCLUDED__ 6#define __C_PARTICLE_MESH_EMITTER_H_INCLUDED__
7 7
8#include "IParticleMeshEmitter.h" 8#include "IParticleMeshEmitter.h"
9#include "irrArray.h" 9#include "irrArray.h"
10#include "aabbox3d.h" 10#include "aabbox3d.h"
11#include "IMeshBuffer.h" 11#include "IMeshBuffer.h"
12 12
13namespace irr 13namespace irr
14{ 14{
15namespace scene 15namespace scene
16{ 16{
17 17
18//! A default box emitter 18//! A default box emitter
19class CParticleMeshEmitter : public IParticleMeshEmitter 19class CParticleMeshEmitter : public IParticleMeshEmitter
20{ 20{
21public: 21public:
22 22
23 //! constructor 23 //! constructor
24 CParticleMeshEmitter( 24 CParticleMeshEmitter(
25 IMesh* mesh, bool useNormalDirection = true, 25 IMesh* mesh, bool useNormalDirection = true,
26 const core::vector3df& direction = core::vector3df(0.0f,0.0f,0.0f), 26 const core::vector3df& direction = core::vector3df(0.0f,0.0f,0.0f),
27 f32 normalDirectionModifier = 100.0f, 27 f32 normalDirectionModifier = 100.0f,
28 s32 mbNumber = -1, 28 s32 mbNumber = -1,
29 bool everyMeshVertex = false, 29 bool everyMeshVertex = false,
30 u32 minParticlesPerSecond = 20, 30 u32 minParticlesPerSecond = 20,
31 u32 maxParticlesPerSecond = 40, 31 u32 maxParticlesPerSecond = 40,
32 const video::SColor& minStartColor = video::SColor(255,0,0,0), 32 const video::SColor& minStartColor = video::SColor(255,0,0,0),
33 const video::SColor& maxStartColor = video::SColor(255,255,255,255), 33 const video::SColor& maxStartColor = video::SColor(255,255,255,255),
34 u32 lifeTimeMin = 2000, 34 u32 lifeTimeMin = 2000,
35 u32 lifeTimeMax = 4000, 35 u32 lifeTimeMax = 4000,
36 s32 maxAngleDegrees = 0, 36 s32 maxAngleDegrees = 0,
37 const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), 37 const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f),
38 const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) 38 const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f)
39 ); 39 );
40 40
41 //! Prepares an array with new particles to emitt into the system 41 //! Prepares an array with new particles to emitt into the system
42 //! and returns how much new particles there are. 42 //! and returns how much new particles there are.
43 virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray); 43 virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray);
44 44
45 //! Set Mesh to emit particles from 45 //! Set Mesh to emit particles from
46 virtual void setMesh( IMesh* mesh ); 46 virtual void setMesh( IMesh* mesh );
47 47
48 //! Set whether to use vertex normal for direction, or direction specified 48 //! Set whether to use vertex normal for direction, or direction specified
49 virtual void setUseNormalDirection( bool useNormalDirection ) { UseNormalDirection = useNormalDirection; } 49 virtual void setUseNormalDirection( bool useNormalDirection ) { UseNormalDirection = useNormalDirection; }
50 50
51 //! Set direction the emitter emits particles 51 //! Set direction the emitter emits particles
52 virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } 52 virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; }
53 53
54 //! Set the amount that the normal is divided by for getting a particles direction 54 //! Set the amount that the normal is divided by for getting a particles direction
55 virtual void setNormalDirectionModifier( f32 normalDirectionModifier ) { NormalDirectionModifier = normalDirectionModifier; } 55 virtual void setNormalDirectionModifier( f32 normalDirectionModifier ) { NormalDirectionModifier = normalDirectionModifier; }
56 56
57 //! Sets whether to emit min<->max particles for every vertex per second, or to pick 57 //! Sets whether to emit min<->max particles for every vertex per second, or to pick
58 //! min<->max vertices every second 58 //! min<->max vertices every second
59 virtual void setEveryMeshVertex( bool everyMeshVertex ) { EveryMeshVertex = everyMeshVertex; } 59 virtual void setEveryMeshVertex( bool everyMeshVertex ) { EveryMeshVertex = everyMeshVertex; }
60 60
61 //! Set minimum number of particles the emitter emits per second 61 //! Set minimum number of particles the emitter emits per second
62 virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } 62 virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; }
63 63
64 //! Set maximum number of particles the emitter emits per second 64 //! Set maximum number of particles the emitter emits per second
65 virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } 65 virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; }
66 66
67 //! Set minimum starting color for particles 67 //! Set minimum starting color for particles
68 virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } 68 virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; }
69 69
70 //! Set maximum starting color for particles 70 //! Set maximum starting color for particles
71 virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } 71 virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; }
72 72
73 //! Set the maximum starting size for particles 73 //! Set the maximum starting size for particles
74 virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } 74 virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; }
75 75
76 //! Set the minimum starting size for particles 76 //! Set the minimum starting size for particles
77 virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } 77 virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; }
78 78
79 //! Set the minimum particle life-time in milliseconds 79 //! Set the minimum particle life-time in milliseconds
80 virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } 80 virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; }
81 81
82 //! Set the maximum particle life-time in milliseconds 82 //! Set the maximum particle life-time in milliseconds
83 virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } 83 virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; }
84 84
85 //! Set maximal random derivation from the direction 85 //! Set maximal random derivation from the direction
86 virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } 86 virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; }
87 87
88 //! Get Mesh we're emitting particles from 88 //! Get Mesh we're emitting particles from
89 virtual const IMesh* getMesh() const { return Mesh; } 89 virtual const IMesh* getMesh() const { return Mesh; }
90 90
91 //! Get whether to use vertex normal for direciton, or direction specified 91 //! Get whether to use vertex normal for direciton, or direction specified
92 virtual bool isUsingNormalDirection() const { return UseNormalDirection; } 92 virtual bool isUsingNormalDirection() const { return UseNormalDirection; }
93 93
94 //! Get direction the emitter emits particles 94 //! Get direction the emitter emits particles
95 virtual const core::vector3df& getDirection() const { return Direction; } 95 virtual const core::vector3df& getDirection() const { return Direction; }
96 96
97 //! Get the amount that the normal is divided by for getting a particles direction 97 //! Get the amount that the normal is divided by for getting a particles direction
98 virtual f32 getNormalDirectionModifier() const { return NormalDirectionModifier; } 98 virtual f32 getNormalDirectionModifier() const { return NormalDirectionModifier; }
99 99
100 //! Gets whether to emit min<->max particles for every vertex per second, or to pick 100 //! Gets whether to emit min<->max particles for every vertex per second, or to pick
101 //! min<->max vertices every second 101 //! min<->max vertices every second
102 virtual bool getEveryMeshVertex() const { return EveryMeshVertex; } 102 virtual bool getEveryMeshVertex() const { return EveryMeshVertex; }
103 103
104 //! Get the minimum number of particles the emitter emits per second 104 //! Get the minimum number of particles the emitter emits per second
105 virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } 105 virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; }
106 106
107 //! Get the maximum number of particles the emitter emits per second 107 //! Get the maximum number of particles the emitter emits per second
108 virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } 108 virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; }
109 109
110 //! Get the minimum starting color for particles 110 //! Get the minimum starting color for particles
111 virtual const video::SColor& getMinStartColor() const { return MinStartColor; } 111 virtual const video::SColor& getMinStartColor() const { return MinStartColor; }
112 112
113 //! Get the maximum starting color for particles 113 //! Get the maximum starting color for 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 //! Get maximal random derivation from the direction 128 //! Get maximal random derivation from the direction
129 virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } 129 virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; }
130 130
131private: 131private:
132 132
133 const IMesh* Mesh; 133 const IMesh* Mesh;
134 core::array<s32> VertexPerMeshBufferList; 134 core::array<s32> VertexPerMeshBufferList;
135 s32 TotalVertices; 135 s32 TotalVertices;
136 u32 MBCount; 136 u32 MBCount;
137 s32 MBNumber; 137 s32 MBNumber;
138 138
139 f32 NormalDirectionModifier; 139 f32 NormalDirectionModifier;
140 core::array<SParticle> Particles; 140 core::array<SParticle> Particles;
141 core::vector3df Direction; 141 core::vector3df Direction;
142 core::dimension2df MaxStartSize, MinStartSize; 142 core::dimension2df MaxStartSize, MinStartSize;
143 u32 MinParticlesPerSecond, MaxParticlesPerSecond; 143 u32 MinParticlesPerSecond, MaxParticlesPerSecond;
144 video::SColor MinStartColor, MaxStartColor; 144 video::SColor MinStartColor, MaxStartColor;
145 u32 MinLifeTime, MaxLifeTime; 145 u32 MinLifeTime, MaxLifeTime;
146 146
147 u32 Time; 147 u32 Time;
148 u32 Emitted; 148 u32 Emitted;
149 s32 MaxAngleDegrees; 149 s32 MaxAngleDegrees;
150 150
151 bool EveryMeshVertex; 151 bool EveryMeshVertex;
152 bool UseNormalDirection; 152 bool UseNormalDirection;
153}; 153};
154 154
155} // end namespace scene 155} // end namespace scene
156} // end namespace irr 156} // end namespace irr
157 157
158 158
159#endif // __C_PARTICLE_MESH_EMITTER_H_INCLUDED__ 159#endif // __C_PARTICLE_MESH_EMITTER_H_INCLUDED__
160 160