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_RATE_CONTROL_H 00021 #define VEE_RATE_CONTROL_H 00022 00023 #include <vee_operator.h> 00024 00025 #include <string> 00026 00027 class VEE_RateControl : public VEE_Operator 00028 { 00029 public: 00030 VEE_RateControl(); 00031 virtual ~VEE_RateControl(); 00032 00033 void defaults(); 00034 00035 virtual void operate(VEE_Object *, float); 00036 virtual VEE_Operator * clone() const; 00037 00038 void setId(const char *id) { m_param = id; } 00039 00040 void setRadius(float r) { m_radius = r; } 00041 void setHeat(float h) { m_heat = h; } 00042 void setHeatCoeff(float c) { m_heatCoeff = c; } 00043 void setRequireHeat(float r) { m_requireHeat = r; } 00044 void setMaxRate(float r) { m_maxRate = r; } 00045 void dieAfter(float d) { m_dieAfter = d; } 00046 protected: 00047 00048 std::string m_param; 00049 00050 float m_rateIntegral; 00051 float m_dieAfter; 00052 float m_rateToHeat; 00053 float m_currentRate; 00054 float m_maxRate; 00055 float m_maxHeat; 00056 float m_requireHeat; 00057 float m_heatCoeff; 00058 float m_heat; 00059 float m_radius; 00060 }; 00061 00062 #endif