vee_wind.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 #ifndef VEE_WIND_H
00020 #define VEE_WIND_H
00021 
00022 #include <vee_clonable_pointer.h>
00023 #include <vee_object.h>
00024 #include <vee_scene.h>
00025 #include <vee_volume.h>
00026 
00027 #include <mj_filter_ap1.h>
00028 
00029 class VEE_Volume;
00030 
00034 class VEE_Wind : public VEE_ForceObject
00035 {
00036 public:
00037   // VEE_Wind(const VEE_Wind &that) : m_volume(0) { *this = that; }
00038   VEE_Wind(const VEE_Vector3 &dir = VEE_Vector3(1.0f, 0.0f, 0.0f),
00039      float strength = 1.0,
00040      float gustiness = 0.0f,
00041      float gustfreq = 0.5f);
00042   ~VEE_Wind();
00043 
00044   virtual bool setValue(const char *, VEE_Value *);
00045   virtual VEE_Variable getVariable(const char *) const;
00046   virtual VEE_Object * clone() const;
00047 
00048   virtual void update(float);
00049 
00050   void getForce(VEE_Vector3 *force,
00051     const VEE_Vector3 &,
00052                 const VEE_Vector3 &);
00053   void boundingBoxOfForce(VEE_BoundingBox *box);
00054 
00055   static VEE_Object * factory();
00056 
00057   // VEE_Wind & operator = (const VEE_Wind &);
00058 
00059   VEE_Volume * volume() { return m_volume.ptr(); }
00060 
00061 protected:
00062 
00063   void redesignFilter();
00064   void recalculateWind();
00065 
00066   VEE_Vector3 m_wind;
00067   VEE_Vector3 m_direction;
00068   float       m_strength;
00069   float       m_gustStrength;
00070   float       m_gustFreq;
00071   float       m_sinceLast;
00072   MJ_FilterAP1<float> m_gustFilter;
00073 
00074   VEE_ClonablePointer<VEE_Volume> m_volume;
00075 };
00076 
00077 #endif

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