arsa  2.7
IParticleAffector.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_AFFECTOR_H_INCLUDED__
6 #define __I_PARTICLE_AFFECTOR_H_INCLUDED__
7 
9 #include "SParticle.h"
10 
11 namespace irr
12 {
13 namespace scene
14 {
15 
18 {
19  EPAT_NONE = 0,
26 };
27 
29 const c8* const ParticleAffectorTypeNames[] =
30 {
31  "None",
32  "Attract",
33  "FadeOut",
34  "Gravity",
35  "Rotate",
36  "Scale",
37  0
38 };
39 
42 {
43 public:
44 
47 
49 
52  virtual void affect(u32 now, SParticle* particlearray, u32 count) = 0;
53 
55  virtual void setEnabled(bool enabled) { Enabled = enabled; }
56 
58  virtual bool getEnabled() const { return Enabled; }
59 
61  virtual E_PARTICLE_AFFECTOR_TYPE getType() const = 0;
62 
63 protected:
64  bool Enabled;
65 };
66 
67 } // end namespace scene
68 } // end namespace irr
69 
70 
71 #endif
72 
An object which is able to serialize and deserialize its attributes into an attributes object.
GLuint GLuint GLsizei count
Definition: SDL_opengl.h:1571
E_PARTICLE_AFFECTOR_TYPE
Types of built in particle affectors.
char c8
8 bit character variable.
Definition: irrTypes.h:35
const c8 *const ParticleAffectorTypeNames[]
Names for built in particle affectors.
Everything in the Irrlicht Engine can be found in this namespace.
Definition: CARSADPad.h:6
A particle affector modifies particles.
virtual void affect(u32 now, SParticle *particlearray, u32 count)=0
Affects an array of particles.
virtual bool getEnabled() const
Gets whether or not the affector is currently enabled.
unsigned int u32
32 bit unsigned variable.
Definition: irrTypes.h:62
GLenum GLenum GLsizei const GLuint GLboolean enabled
virtual void setEnabled(bool enabled)
Sets whether or not the affector is currently enabled.
virtual E_PARTICLE_AFFECTOR_TYPE getType() const =0
Get emitter type.
Struct for holding particle data.
Definition: SParticle.h:17