00001 /* -*- C++ -*- */ 00002 00003 /* COPYRIGHT 00004 * 00005 * This file is part of the Visual Effects Engine - VEE 00006 * 00007 * Read the "VEE-LICENSE" file for the license. 00008 * 00009 * Authors & Copyright: 00010 * 00011 * Tommi Ilmonen, Tuukka Heikura, Marko Myllymaa and 00012 * Janne Kontkanen 2001-2004 00013 * 00014 * Additional copyrights: Tekes 2003-2004 00015 * 00016 * firstname.lastname@hut.fi 00017 * 00018 */ 00019 00020 00021 #ifndef VEE_POLYGON_FIRE_H 00022 #define VEE_POLYGON_FIRE_H 00023 00024 #include <vee_color_table.h> 00025 #include <vee_particle.h> 00026 #include <vee_random.h> 00027 00030 class VEE_PolygonFire : public VEE_Particle 00031 { 00032 public: 00033 VEE_PolygonFire(float flameHz = 20.0, 00034 float flameAge = 4.0, 00035 float vortexHz = 3.0, 00036 float gustHz = 1.0); 00037 virtual ~VEE_PolygonFire(); 00038 00039 virtual bool setValue(const char *, VEE_Value *); 00040 virtual VEE_Object * clone() const; 00041 00042 virtual void update(float dt); 00043 00044 protected: 00045 00046 virtual void emitFlame(); 00047 virtual void emitGust(); 00048 virtual void emitVortex(); 00049 00050 VEE_RgbaTable m_colorTable; 00051 00052 float m_flameInterval; 00053 float m_sinceLastFlame; 00054 float m_flameAge; 00055 00056 float m_vortexInterval; 00057 float m_sinceLastVortex; 00058 00059 float m_gustInterval; 00060 float m_sinceLastGust; 00061 00062 VEE_RandomUniform m_rand; 00063 00064 }; 00065 00066 #endif