MapReferenceICP: include/map.h Source File

- Main Page
- Modules
- Classes
- Files

# include/map.h

    00001 /***************************************************************************
    00002  *   Copyright (C) 2005 by Tarek Taha                                      *
    00003  *   tataha@eng.uts.edu.au                                                 *
    00004  *                                                                         *
    00005  *   This program is free software; you can redistribute it and/or modify  *
    00006  *   it under the terms of the GNU General Public License as published by  *
    00007  *   the Free Software Foundation; either version 2 of the License, or     *
    00008  *   (at your option) any later version.                                   *
    00009  *                                                                         *
    00010  *   This program is distributed in the hope that it will be useful,       *
    00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
    00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
    00013  *   GNU General Public License for more details.                          *
    00014  *                                                                         *
    00015  *   You should have received a copy of the GNU General Public License     *
    00016  *   along with this program; if not, write to the                         *
    00017  *   Free Software Foundation, Inc.,                                       *
    00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
    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