00001 #ifndef SPACE3DUNIT_H_
00002 #define SPACE3DUNIT_H_
00003
00004 #include <boost/array.hpp>
00005
00006 #include <defines.h>
00007 #include <list>
00008
00009 #include <controllers/innerSpace/GraphNode3D.h>
00010 #include <controllers/innerSpace/Space3D.h>
00011
00012 #ifdef WITH_VISUALISATION
00013 #include <linda/gnuplot_i.h>
00014 #endif
00015
00016 namespace srAlmende
00017 {
00018
00019 typedef boost::array<struct Product, PRODUCT_COUNT> arrayProducts;
00020
00021 class Space3D;
00022
00031 struct Product {
00032 unsigned char id;
00033 unsigned char quantity;
00034 unsigned char new_quantity;
00035 };
00036
00043 class Space3DUnit {
00044 public:
00045 Space3DUnit();
00046 virtual ~Space3DUnit();
00047
00048 void Init();
00049
00050 Location3D *location;
00051 GraphNode3D *node;
00052
00054 Space3D *space;
00055
00057 arrayProducts products;
00058
00060 std::list<Space3DUnit*> getNeighbours();
00061
00062 int sumProductQuantities();
00063
00064 #ifdef WITH_VISUALISATION
00065 void DrawCell(gnuplot_ctrl *handle);
00066 #endif
00067 };
00068
00069 }
00070
00071 #endif