arsa  2.7
IParticleEmitter.h
Go to the documentation of this file.
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 
9 #include "SParticle.h"
10 
11 namespace irr
12 {
13 namespace scene
14 {
15 
18 {
27 };
28 
30 const c8* const ParticleEmitterTypeNames[] =
31 {
32  "Point",
33  "AnimatedMesh",
34  "Box",
35  "Cylinder",
36  "Mesh",
37  "Ring",
38  "Sphere",
39  0
40 };
41 
43 
46 {
47 public:
48 
50 
55  virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray) = 0;
56 
58  virtual void setDirection( const core::vector3df& newDirection ) = 0;
59 
61  virtual void setMinParticlesPerSecond( u32 minPPS ) = 0;
62 
64  virtual void setMaxParticlesPerSecond( u32 maxPPS ) = 0;
65 
67  virtual void setMinStartColor( const video::SColor& color ) = 0;
68 
70  virtual void setMaxStartColor( const video::SColor& color ) = 0;
71 
73  virtual void setMaxStartSize( const core::dimension2df& size ) = 0;
74 
76  virtual void setMinStartSize( const core::dimension2df& size ) = 0;
77 
79  virtual void setMinLifeTime( u32 lifeTimeMin ) = 0;
80 
82  virtual void setMaxLifeTime( u32 lifeTimeMax ) = 0;
83 
85  virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) = 0;
86 
88  virtual const core::vector3df& getDirection() const = 0;
89 
91  virtual u32 getMinParticlesPerSecond() const = 0;
92 
94  virtual u32 getMaxParticlesPerSecond() const = 0;
95 
97  virtual const video::SColor& getMinStartColor() const = 0;
98 
100  virtual const video::SColor& getMaxStartColor() const = 0;
101 
103  virtual const core::dimension2df& getMaxStartSize() const = 0;
104 
106  virtual const core::dimension2df& getMinStartSize() const = 0;
107 
109  virtual u32 getMinLifeTime() const = 0;
110 
112  virtual u32 getMaxLifeTime() const = 0;
113 
115  virtual s32 getMaxAngleDegrees() const = 0;
116 
118  virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_POINT; }
119 };
120 
122 
123 } // end namespace scene
124 } // end namespace irr
125 
126 
127 #endif
128 
An object which is able to serialize and deserialize its attributes into an attributes object.
const c8 *const ParticleEmitterTypeNames[]
Names for built in particle emitters.
virtual E_PARTICLE_EMITTER_TYPE getType() const
Get emitter type.
virtual u32 getMaxParticlesPerSecond() const =0
Get the maximum number of particles the emitter emits per second.
virtual void setMinStartColor(const video::SColor &color)=0
Set minimum starting color for particles.
virtual void setMaxAngleDegrees(s32 maxAngleDegrees)=0
Set maximal random derivation from the direction.
char c8
8 bit character variable.
Definition: irrTypes.h:35
virtual void setMaxLifeTime(u32 lifeTimeMax)=0
Set the maximum particle life-time in milliseconds.
Everything in the Irrlicht Engine can be found in this namespace.
Definition: CARSADPad.h:6
virtual void setMinParticlesPerSecond(u32 minPPS)=0
Set minimum number of particles the emitter emits per second.
GLsizeiptr size
Specifies a 2 dimensional size.
Definition: dimension2d.h:20
virtual void setMaxParticlesPerSecond(u32 maxPPS)=0
Set maximum number of particles the emitter emits per second.
virtual const core::vector3df & getDirection() const =0
Get direction the emitter emits particles.
virtual void setDirection(const core::vector3df &newDirection)=0
Set direction the emitter emits particles.
virtual void setMinStartSize(const core::dimension2df &size)=0
Set the minimum starting size for particles.
virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle *&outArray)=0
Prepares an array with new particles to emit into the system.
signed int s32
32 bit signed variable.
Definition: irrTypes.h:70
virtual const core::dimension2df & getMinStartSize() const =0
Get the minimum starting size for particles.
E_PARTICLE_EMITTER_TYPE
Types of built in particle emitters.
unsigned int u32
32 bit unsigned variable.
Definition: irrTypes.h:62
virtual const core::dimension2df & getMaxStartSize() const =0
Get the maximum starting size for particles.
virtual u32 getMinLifeTime() const =0
Get the minimum particle life-time in milliseconds.
virtual void setMaxStartColor(const video::SColor &color)=0
Set maximum starting color for particles.
IParticleEmitter IParticlePointEmitter
virtual const video::SColor & getMaxStartColor() const =0
Get the maximum starting color for particles.
Class representing a 32 bit ARGB color.
Definition: SColor.h:316
virtual u32 getMinParticlesPerSecond() const =0
Get the minimum number of particles the emitter emits per second.
virtual s32 getMaxAngleDegrees() const =0
Get maximal random derivation from the direction.
A particle emitter for using with particle systems.
GLuint color
virtual u32 getMaxLifeTime() const =0
Get the maximum particle life-time in milliseconds.
virtual void setMinLifeTime(u32 lifeTimeMin)=0
Set the minimum particle life-time in milliseconds.
virtual void setMaxStartSize(const core::dimension2df &size)=0
Set the maximum starting size for particles.
virtual const video::SColor & getMinStartColor() const =0
Get the minimum starting color for particles.
Struct for holding particle data.
Definition: SParticle.h:17