vee_magic_rain.h

Go to the documentation of this file.
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 #ifndef VEE_MAGIC_RAIN_H
00021 #define VEE_MAGIC_RAIN_H
00022 
00023 #include <vee_color_table.h>
00024 #include <vee_particle.h>
00025 #include <vee_random.h>
00026 
00027 class VEE_VolumeDisk;
00028 
00029 class VEE_MagicRainDrop : public VEE_Particle
00030 {
00031 public:
00032   VEE_MagicRainDrop(VEE_Vector3 location, 
00033         VEE_Vector3 velocity,
00034         float ageLimit, 
00035         VEE_Looks *l,
00036         float childSpeed,
00037         float childAgeLimit,
00038         float creationRate);
00039 
00040   virtual ~VEE_MagicRainDrop() {}
00041 
00042   virtual bool setValue(const char *, VEE_Value *);
00043   virtual VEE_Object * clone() const;
00044 
00045   virtual void update(float dt);
00046   
00047   void setChildrensInitialSpeed(float speedMin, float speedMax) 
00048   { m_childSpeedMin = speedMin; m_childSpeedMax = speedMax; }
00049 
00050   void setCreationRate(float rate) { m_creationRate = rate; }
00051   
00052   uint childCount() const { return m_childCount; }
00053 
00054   void setVelocityUpdate(bool p) { m_updateVelocity = p; }
00055 
00056 protected:
00057 
00058   void createNewParticle();
00059   
00060   float m_childSpeedMin;
00061   float m_childSpeedMax;
00062   float m_childAgeLimit;
00063   float m_creationRate;
00064 
00065   float m_sinceLastCreated;
00066 
00067   VEE_RandomUniform m_rand;
00068 
00069   uint m_childCount;
00070 
00071   VEE_Matrix3 m_rotation;
00072 
00073 };
00074 
00077 
00081 class VEE_MagicRain : public VEE_Particle
00082 {
00083 public:
00084   VEE_MagicRain(VEE_Vector3 location, 
00085     VEE_Vector3 velocity,
00086     float ageLimit, 
00087     float radius,
00088     float childSpeed,
00089     float childRate);
00090 
00091   virtual ~VEE_MagicRain();
00092 
00093   virtual bool setValue(const char *, VEE_Value *);
00094   virtual VEE_Object * clone() const;
00095 
00096   virtual void update(float dt);
00097 
00098   virtual void render(VEE_Renderer *);
00099   
00100   void setCreationRate(float r)
00101   { m_childRate = r; }
00102 
00103   
00104 protected:
00105 
00106   VEE_RgbaTable m_colorTable;
00107 
00108   VEE_VolumeDisk *m_volume;
00109 
00110   VEE_RandomUniform m_rand;
00111 
00112   float m_childSpeed;
00113   float m_childRate;
00114   float m_sinceLastCreated;
00115 };
00116 
00117 #endif

Generated on Mon Mar 12 21:09:00 2007 for VEE - The Visual Effects Engine by  doxygen 1.4.6