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_RADIAL_H_
00025 #define __FIREVISION_SCANLINE_RADIAL_H_
00026
00027 #include <models/scanlines/scanlinemodel.h>
00028 #include <fvutils/base/types.h>
00029
00030 namespace firevision {
00031 #if 0
00032 }
00033 #endif
00034
00035 class ScanlineRadial : public ScanlineModel
00036 {
00037
00038 public:
00039
00040 ScanlineRadial(unsigned int width, unsigned int height,
00041 unsigned int center_x, unsigned int center_y,
00042 unsigned int radius_increment, unsigned int step,
00043 unsigned int max_radius = 0, unsigned int dead_radius = 0
00044 );
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
00059 void set_center(unsigned int center_x, unsigned int center_y);
00060 void set_radius(unsigned int dead_radius, unsigned int max_radius);
00061
00062
00063 private:
00064
00065 void simpleBubbleSort(unsigned int array[], unsigned int num_elements);
00066
00067 unsigned int width;
00068 unsigned int height;
00069 unsigned int center_x;
00070 unsigned int center_y;
00071 unsigned int radius_increment;
00072 unsigned int step;
00073 unsigned int current_radius;
00074 unsigned int max_radius;
00075 unsigned int dead_radius;
00076 bool auto_max_radius;
00077
00078 fawkes::point_t coord;
00079 fawkes::point_t tmp_coord;
00080
00081 unsigned int sector;
00082
00083 bool done;
00084
00085 int x;
00086 int y;
00087 int tmp_x;
00088 int tmp_y;
00089
00090 };
00091
00092 }
00093
00094 #endif