vee_damping.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_DAMPING_H
00021 #define VEE_DAMPING_H
00022 
00023 #include <vee_force_object.h>
00024 
00025 #include <vee_volume.h>
00026 #include <vee_clonable_pointer.h>
00027 
00034 class VEE_Damping : public VEE_ForceObject
00035 {
00036 public:
00037   VEE_Damping();
00038   VEE_Damping(VEE_Volume *sourceArea, float m, float ageLimit);
00039   ~VEE_Damping();
00040 
00041   virtual bool setValue(const char *, VEE_Value *);
00042   virtual VEE_Object * clone() const;
00043 
00044   float magnitude() { return m_magnitude; }
00045 
00046   // VEE_Vector3 *location() { return m_sourceArea->location(); }
00047   // VEE_Vector3 *centralLocation() { return m_volumeArea->location(); }
00048   VEE_Volume *volumeArea() { return m_volumeArea.ptr(); }
00049 
00050   virtual void setMagnitude(const float m) { m_magnitude = m; }
00051   /* virtual void setLocation(const VEE_Vector3 &l)
00052      { m_volumeArea->setCenter(l[0], l[1], l[2]); }*/
00053   void setVolume(VEE_Volume *volumeArea) 
00054   { m_volumeArea = volumeArea; }
00055 
00056   void getForce(VEE_Vector3 *force,
00057     const VEE_Vector3 &velocity,
00058                 const VEE_Vector3 &location);
00059   void boundingBoxOfForce(VEE_BoundingBox *box);
00060 
00061   static VEE_Object * factory();
00062 
00063 protected:
00064 
00065   VEE_ClonablePointer<VEE_Volume> m_volumeArea;
00066 
00067   float m_magnitude;
00068 
00069 };
00070 
00071 #endif

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