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_GRAVITATE_H 00021 #define VEE_GRAVITATE_H 00022 00023 #include <vee_scene.h> 00024 #include <vee_object.h> 00025 00029 class VEE_Gravitate : public VEE_ForceObject 00030 { 00031 public: 00032 VEE_Gravitate(); 00033 00034 VEE_Gravitate(VEE_Vector3 location, 00035 VEE_Vector3 velocity, 00036 float ageLimit, 00037 float m, 00038 bool updateVelocity = false); 00039 00040 ~VEE_Gravitate() {} 00041 00042 virtual bool setValue(const char *, VEE_Value *); 00043 virtual VEE_Variable getVariable(const char *) const; 00044 virtual VEE_Object * clone() const; 00045 00046 float epsilon() { return m_epsilon; } 00047 float magnitude() { return m_magnitude; } 00048 00049 void setEpsilon(float e) { m_epsilon = e; } 00050 void setMagnitude(float m) { m_magnitude = m; } 00051 void setRange(float r) { m_range = r; } 00052 00054 void setDecayPower(float decay) { m_decayPower = decay; } 00055 00056 void getForce(VEE_Vector3 *force, 00057 const VEE_Vector3 &, 00058 const VEE_Vector3 &location); 00059 00060 void boundingBoxOfForce(VEE_BoundingBox *box); 00061 00062 static VEE_Object * factory(); 00063 00064 protected: 00065 00066 float m_epsilon; 00067 float m_magnitude; 00068 float m_decayPower; 00069 float m_range; 00070 float m_maxForce; 00071 }; 00072 00073 #endif