00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef map_HEADER
00021 #define map_HEADER
00022
00023 #include <gdk-pixbuf/gdk-pixbuf.h>
00024 #include <gtk/gtk.h>
00025 #include <glib/gprintf.h>
00026
00027 #include <sys/stat.h>
00028 class MapInfo
00029 {
00030 public :
00031 int height;
00032 int width;
00033 double pixel_size;
00034 };
00035 typedef struct mapgrid
00036 {
00037 double prob_occ,prob_free;
00038 bool added;
00039 } mapgrid_t;
00040 class MAP
00041 {
00042 private:
00043 double pixel_size;
00044 int negate;
00045 GdkPixbuf * pixbuf;
00046 public:
00047 int size_x, size_y;
00048 mapgrid * * occ_grid;
00049 char * Mapname;
00050 MapInfo GetMapInfo();
00051 void SavePixelBufferToFile();
00052 void DrawPixel(int,int,int,int,int);
00053 void ClearData();
00054 void ResetProb();
00055 int SavePgm();
00056 GdkPixbuf * CreateMap();
00057 ~MAP();
00058 MAP(char*, double,double);
00059 };
00060 #endif