Irrlicht 3D Engine
IParticleEmitter.h
Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
00002 // This file is part of the "Irrlicht Engine".
00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
00004 
00005 #ifndef __I_PARTICLE_EMITTER_H_INCLUDED__
00006 #define __I_PARTICLE_EMITTER_H_INCLUDED__
00007 
00008 #include "IAttributeExchangingObject.h"
00009 #include "SParticle.h"
00010 
00011 namespace irr
00012 {
00013 namespace scene
00014 {
00015 
00017 enum E_PARTICLE_EMITTER_TYPE
00018 {
00019     EPET_POINT = 0,
00020     EPET_ANIMATED_MESH,
00021     EPET_BOX,
00022     EPET_CYLINDER,
00023     EPET_MESH,
00024     EPET_RING,
00025     EPET_SPHERE,
00026     EPET_COUNT
00027 };
00028 
00030 const c8* const ParticleEmitterTypeNames[] =
00031 {
00032     "Point",
00033     "AnimatedMesh",
00034     "Box",
00035     "Cylinder",
00036     "Mesh",
00037     "Ring",
00038     "Sphere",
00039     0
00040 };
00041 
00043 
00045 class IParticleEmitter : public virtual io::IAttributeExchangingObject
00046 {
00047 public:
00048 
00050 
00055     virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray) = 0;
00056 
00058     virtual void setDirection( const core::vector3df& newDirection ) = 0;
00059 
00061     virtual void setMinParticlesPerSecond( u32 minPPS ) = 0;
00062 
00064     virtual void setMaxParticlesPerSecond( u32 maxPPS ) = 0;
00065 
00067     virtual void setMinStartColor( const video::SColor& color ) = 0;
00068 
00070     virtual void setMaxStartColor( const video::SColor& color ) = 0;
00071 
00073     virtual void setMaxStartSize( const core::dimension2df& size ) = 0;
00074 
00076     virtual void setMinStartSize( const core::dimension2df& size ) = 0;
00077 
00079     virtual void setMinLifeTime( u32 lifeTimeMin ) = 0;
00080 
00082     virtual void setMaxLifeTime( u32 lifeTimeMax ) = 0;
00083 
00085     virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) = 0;
00086 
00088     virtual const core::vector3df& getDirection() const = 0;
00089 
00091     virtual u32 getMinParticlesPerSecond() const = 0;
00092 
00094     virtual u32 getMaxParticlesPerSecond() const = 0;
00095 
00097     virtual const video::SColor& getMinStartColor() const = 0;
00098 
00100     virtual const video::SColor& getMaxStartColor() const = 0;
00101 
00103     virtual const core::dimension2df& getMaxStartSize() const = 0;
00104 
00106     virtual const core::dimension2df& getMinStartSize() const = 0;
00107 
00109     virtual u32 getMinLifeTime() const = 0;
00110 
00112     virtual u32 getMaxLifeTime() const = 0;
00113 
00115     virtual s32 getMaxAngleDegrees() const = 0;
00116 
00117 
00119     virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_POINT; }
00120 };
00121 
00122 typedef IParticleEmitter IParticlePointEmitter;
00123 
00124 } // end namespace scene
00125 } // end namespace irr
00126 
00127 
00128 #endif
00129