grid.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __FIREVISION_SCANLINE_GRID_H_
00025 #define __FIREVISION_SCANLINE_GRID_H_
00026
00027 #include <models/scanlines/scanlinemodel.h>
00028 #include <fvutils/base/roi.h>
00029 #include <fvutils/base/types.h>
00030
00031 namespace firevision {
00032 #if 0
00033 }
00034 #endif
00035
00036 class ScanlineGrid : public ScanlineModel
00037 {
00038
00039 public:
00040
00041 ScanlineGrid(unsigned int width, unsigned int height,
00042 unsigned int offset_x, unsigned int offset_y,
00043 ROI* roi = NULL, bool horizontal_grid = true);
00044 virtual ~ScanlineGrid();
00045
00046 fawkes::point_t operator*();
00047 fawkes::point_t * operator->();
00048 fawkes::point_t * operator++();
00049 fawkes::point_t * operator++(int);
00050
00051 bool finished();
00052 void reset();
00053 const char * get_name();
00054 unsigned int get_margin();
00055
00056 virtual void set_robot_pose(float x, float y, float ori);
00057 virtual void set_pan_tilt(float pan, float tilt);
00058 virtual void set_roi(ROI* roi = NULL);
00059
00060 void setDimensions(unsigned int width, unsigned int height, ROI* roi = NULL);
00061 void setOffset(unsigned int offset_x, unsigned int offset_y);
00062 void setGridParams(unsigned int width, unsigned int height,
00063 unsigned int offset_x, unsigned int offset_y,
00064 ROI* roi = NULL, bool horizontal_grid = true);
00065
00066 private:
00067 unsigned int width;
00068 unsigned int height;
00069 unsigned int offset_x;
00070 unsigned int offset_y;
00071
00072 ROI* roi;
00073
00074 bool horizontal_grid;
00075 bool more_to_come;
00076
00077 fawkes::point_t coord;
00078 fawkes::point_t tmp_coord;
00079
00080 void calc_next_coord();
00081 };
00082
00083 }
00084
00085 #endif