00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00014 00015 #ifndef _FLOCK_H 00016 #define _FLOCK_H 00017 00018 #include "globals.h" 00019 #include "aiCharacter.h" 00020 00021 class AICharacter; 00022 00028 00030 00031 class Flock { 00032 private: 00033 unsigned int _flock_id; 00034 00035 public: 00036 // Variables which will hold the parameters of the ai character's visibilty cone. 00037 double _flock_vcone_angle; 00038 double _flock_vcone_radius; 00039 00040 // Variables to specify weights of separation, cohesion and alignment behaviors and thus 00041 // create variable flock behavior. 00042 unsigned int _separation_wt; 00043 unsigned int _cohesion_wt; 00044 unsigned int _alignment_wt; 00045 00046 // This vector will hold all the ai characters which belong to this flock. 00047 typedef std::vector<AICharacter*> AICharList; 00048 AICharList _ai_char_list; 00049 00050 PUBLISHED: 00051 Flock(unsigned int flock_id, double vcone_angle, double vcone_radius, unsigned int separation_wt = 2, 00052 unsigned int cohesion_wt = 4, unsigned int alignment_wt = 1); 00053 ~Flock(); 00054 00055 // Function to add the ai characters to _ai_char_list. 00056 void add_ai_char(AICharacter *ai_char); 00057 00058 // Function to access the private member flock_id. 00059 unsigned int get_id(); 00060 }; 00061 00062 #endif