radial.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_RADIAL_H_
00025 #define __FIREVISION_SCANLINE_RADIAL_H_
00026
00027 #include <models/scanlines/scanlinemodel.h>
00028 #include <fvutils/base/types.h>
00029
00030 class ScanlineRadial : public ScanlineModel
00031 {
00032
00033 public:
00034
00035 ScanlineRadial(unsigned int width, unsigned int height,
00036 unsigned int center_x, unsigned int center_y,
00037 unsigned int radius_increment, unsigned int step,
00038 unsigned int max_radius = 0, unsigned int dead_radius = 0
00039 );
00040
00041 fawkes::point_t operator*();
00042 fawkes::point_t * operator->();
00043 fawkes::point_t * operator++();
00044 fawkes::point_t * operator++(int);
00045
00046 bool finished();
00047 void reset();
00048 const char * get_name();
00049 unsigned int get_margin();
00050
00051 virtual void set_robot_pose(float x, float y, float ori) {}
00052 virtual void set_pan_tilt(float pan, float tilt) {}
00053
00054 void set_center(unsigned int center_x, unsigned int center_y);
00055 void set_radius(unsigned int dead_radius, unsigned int max_radius);
00056
00057
00058 private:
00059
00060 void simpleBubbleSort(unsigned int array[], unsigned int num_elements);
00061
00062 unsigned int width;
00063 unsigned int height;
00064 unsigned int center_x;
00065 unsigned int center_y;
00066 unsigned int radius_increment;
00067 unsigned int step;
00068 unsigned int current_radius;
00069 unsigned int max_radius;
00070 unsigned int dead_radius;
00071 bool auto_max_radius;
00072
00073 fawkes::point_t coord;
00074 fawkes::point_t tmp_coord;
00075
00076 unsigned int sector;
00077
00078 bool done;
00079
00080 int x;
00081 int y;
00082 int tmp_x;
00083 int tmp_y;
00084
00085 };
00086
00087 #endif