animal_.hpp

Idź do dokumentacji tego pliku.
00001 #ifndef __ANIMAL__HPP__
00002 #define __ANIMAL__HPP__
00003 
00004 #include "animalParam.hpp"
00005 #include "vector2D.hpp"
00006 
00007 #define ANIMAL_TYPE_PREDATOR 1
00008 #define ANIMAL_TYPE_ANIMAL 2
00009 
00010 using namespace std;
00011 
00019 class Animal_ {
00020 protected:
00021         int _type; //< 1=drapieznik, 2=ofiara */
00022         string _name; //< nazwa, pole pomocnicze */
00023         double _V_max; //< predkosc maksymalna [m/s] */
00024         double _dV_max; //< tolerancja predkosci [%] */
00025         double _a_max; //< przyspieszenie maksymalne [m^2/s] */
00026         double _da_max; //< tolerancja przyspieszenia [%] */
00027         double _E_max; //< energia maksymalna */
00028         double _dE_max; //< tolerancja energii [%] */
00029         double _phi_max; //< zwrotnosc maksymalna [rad/_t] */
00030         double _dphi_max; //< tolerancja zwrotnosci [%] */
00031         double _m; //< masa [kg] */     
00032         unsigned int _t; //< czas reakcji [ms] */
00033         unsigned int _r; //< gabaryty zwierzecia, w modelu traktowany 
00034                         //< jak promien okregu o promieniu _r [m] */
00035 
00036 public: 
00037         AnimalParam _param; //< parametry biezace zwierzecia */ 
00038 
00039 public:
00043         Animal_();
00044         
00053         int setType(int typ);
00054 
00058         int getType() const;
00059 
00066         void set_V_max(double V_max, double dV_max=3);
00067         
00072          void set_dV_max(double dV_max=3);
00073 
00078         double get_V_max() const;
00079 
00084         double get_dV_max() const;
00085 
00092         void set_a_max(double a_max, double da_max=3); 
00093         
00098          void set_da_max(double da_max=3);
00099 
00104         double get_a_max() const;
00105 
00110         double get_da_max() const;
00111 
00118         void set_E_max(double E_max, double dE_max=3);
00119 
00124          void set_dE_max(double dE_max=3);
00125 
00126 
00131         double get_E_max() const;
00132 
00137         double get_dE_max() const;
00138 
00145         void set_phi_max(double phi_max, double dphi_max=3);
00146 
00151          void set_dphi_max(double dphi_max=3);
00152 
00153 
00158         double get_phi_max() const;
00159 
00164         double get_dphi_max() const;
00165 
00170         void set_m(double m);
00171 
00176         double get_m() const;
00177 
00182         void set_t(unsigned int t);
00183 
00188         int get_t() const;
00189         
00195         void set_r(unsigned int r);
00196 
00201         unsigned int get_r() const;
00202 
00206         Animal_ getAnimal_() const;
00207 
00208 };
00209 
00210 #endif
00211 

Wygenerowano Tue Jan 22 12:58:54 2008 dla Zwierzaki programem  doxygen 1.5.2