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_BEAMS_H_
00025 #define __FIREVISION_SCANLINE_BEAMS_H_
00026
00027 #include <models/scanlines/scanlinemodel.h>
00028 #include <fvutils/base/types.h>
00029
00030 #include <vector>
00031
00032 namespace firevision {
00033 #if 0
00034 }
00035 #endif
00036
00037 class ScanlineBeams : public ScanlineModel
00038 {
00039
00040 public:
00041
00042 ScanlineBeams(unsigned int image_width, unsigned int image_height,
00043 unsigned int start_x, unsigned int start_y,
00044 unsigned int stop_y, unsigned int offset_y,
00045 bool distribute_start_x,
00046 float angle_from, float angle_range, unsigned int num_beams);
00047
00048 fawkes::point_t operator*();
00049 fawkes::point_t * operator->();
00050 fawkes::point_t * operator++();
00051 fawkes::point_t * operator++(int);
00052
00053 bool finished();
00054 void reset();
00055 const char * get_name();
00056 unsigned int get_margin();
00057
00058 virtual void set_robot_pose(float x, float y, float ori) {}
00059 virtual void set_pan_tilt(float pan, float tilt) {}
00060
00061 private:
00062 void advance();
00063
00064
00065 bool _finished;
00066
00067 std::vector<fawkes::point_t> beam_current_pos;
00068 std::vector<fawkes::point_t> beam_end_pos;
00069
00070 unsigned int start_x;
00071 unsigned int start_y;
00072 float angle_from;
00073 float angle_range;
00074 unsigned int num_beams;
00075 unsigned int stop_y;
00076 unsigned int offset_y;
00077 unsigned int image_width;
00078 unsigned int image_height;
00079 bool distribute_start_x;
00080
00081 fawkes::point_t coord;
00082 fawkes::point_t tmp_coord;
00083
00084 unsigned int next_beam;
00085 unsigned int first_beam;
00086 unsigned int last_beam;
00087 };
00088
00089 }
00090
00091 #endif