DrawLanes.h
Go to the documentation of this file.
00001 /* -*- mode: C++ -*- */
00002 /*
00003  *  Copyright (C) 2007, 2010 David Li, Patrick Beeson, Jack O'Quin
00004  *
00005  *  License: Modified BSD Software License Agreement
00006  * 
00007  *  $Id: DrawLanes.h 415 2010-08-19 00:23:10Z jack.oquin $
00008  */
00009 
00018 #ifndef __DRAW_LANES_H__
00019 #define __DRAW_LANES_H__
00020 
00021 #include <vector>
00022 #include <math.h>
00023 #include <errno.h>
00024 #include <stdint.h>
00025 //#include <art_map/zones.h>
00026 
00027 /*struct poly{
00028                 double x1;
00029                 double x2;
00030                 double x3;
00031                 double x4;
00032                 double y1;
00033                 double y2;
00034                 double y3;
00035                 double y4;
00036         };*/
00037 
00038 struct RGB {
00039   int r;
00040   int g;
00041   int b;
00042 };
00043 
00044 #define DEFAULT_RATIO 3.0f
00045 
00046 class DrawLanes {
00047 public:
00048   DrawLanes(int x,int y, float multi=DEFAULT_RATIO);
00049   ~DrawLanes();
00050   
00051   void clear();
00052   
00053   void savePGM(const char *filename);
00054   void saveBMP(const char *filename);
00055 
00056   void addPoly(float x1, float x2, float x3, float x4,
00057                float y1, float y2,float y3, float y4,
00058                bool is_stop, bool is_exit);
00059 
00060   //void addZone(const ZonePerimeter &zone, float min_x, float max_y);
00061 
00062   void addWay(float w1lat, float w1long);
00063   void addRobot(float w1lat, float w1long);
00064   void addTrace(float w1lat, float w1long, float w2lat, float w2long);
00065 
00066 private:
00067   float MULT;
00068 
00069   RGB* image;
00070   int imageWidth;
00071   int imageHeight;
00072 
00073   void line(float x0, float y0, float x1, float y1,RGB colour);
00074 };
00075 
00076 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


art_map
Author(s): David Li, Patrick Beeson, Bartley Gillen, Tarun Nimmagadda, Mickey Ristroph, Michael Quinlan, Jack O'Quin
autogenerated on Tue Sep 24 2013 10:41:51