00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef CELL_H
00026 #define CELL_H
00027
00028 #include <GL/glut.h>
00029 #include <list>
00030 #include <map>
00031
00032 #include "Drawable.h"
00033
00034 class Worshiper;
00035 class Pheromone;
00036
00040 class Cell : public Drawable
00041 {
00042 protected:
00043
00045 static GLuint _tex_name;
00046
00052 virtual GLuint getTexName();
00053
00061 virtual void getColors(GLubyte &red, GLubyte &green, GLubyte &blue);
00062
00066 Cell();
00067
00068 public:
00069
00073 virtual ~Cell();
00074
00078 virtual void draw();
00079
00085 virtual unsigned int getFood();
00086
00093 virtual unsigned int addFood(unsigned int inc);
00094
00101 virtual unsigned int subFood(unsigned int inc);
00102
00109 virtual bool reachable(Worshiper *w);
00110
00116 virtual std::list<Worshiper*>* getPeople();
00117
00124 virtual std::map<Pheromone*, unsigned int>* getPheromones();
00125
00132 virtual bool addWorshiper(Worshiper *w);
00133
00140 virtual bool removeWorshiper(const Worshiper *w);
00141
00148 virtual void addPheromone(Pheromone *p);
00149
00155 virtual Cell* makeActions();
00156 };
00157
00158 #endif // CELL_H