Fawkes API Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * radial.h - Scanline model implementation: radial 00004 * 00005 * Created: Tue Jul 19 12:05:31 2005 00006 * Copyright 2005 Tim Niemueller [www.niemueller.de] 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. A runtime exception applies to 00014 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Library General Public License for more details. 00020 * 00021 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 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 /* just to make Emacs auto-indent happy */ 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 } // end namespace firevision 00093 00094 #endif