Fawkes API Fawkes Development Version
|
00001 /*************************************************************************** 00002 * field_lines.h - Container for field lines 00003 * 00004 * Created: Mon Sep 22 12:00:00 2008 00005 * Copyright 2008 Christof Rath <christof.rath@gmail.com> 00006 * 00007 ****************************************************************************/ 00008 00009 /* This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU Library General Public License for more details. 00018 * 00019 * Read the full text in the LICENSE.GPL file in the doc directory. 00020 */ 00021 00022 #ifndef __FVUTILS_DRAW_FIELD_LINES_H__ 00023 #define __FVUTILS_DRAW_FIELD_LINES_H__ 00024 00025 #include <utils/math/types.h> 00026 #include <list> 00027 #include <string> 00028 00029 namespace firevision { 00030 #if 0 /* just to make Emacs auto-indent happy */ 00031 } 00032 #endif 00033 00034 typedef std::list<fawkes::arc_t> field_circles_t; 00035 00036 class FieldLines: public std::list<fawkes::field_line_t> 00037 { 00038 public: 00039 virtual ~FieldLines(); 00040 00041 float get_line_width() const; 00042 float get_field_length() const { return _field_length; } 00043 float get_field_width() const { return _field_width; } 00044 fawkes::cart_coord_2d_t get_field_offsets() const { return _field_offsets; } 00045 const field_circles_t& get_circles() const { return _field_circles; } 00046 const std::string& get_name() const; 00047 00048 protected: 00049 FieldLines(std::string field_name, float field_length, float field_width, float line_width); 00050 virtual void init() = 0; 00051 00052 void calc_offsets(); 00053 00054 std::string _field_name; 00055 float _line_width; 00056 float _field_length; 00057 float _field_width; 00058 fawkes::cart_coord_2d_t _field_offsets; 00059 field_circles_t _field_circles; 00060 }; 00061 00062 class FieldLines6x4: public FieldLines 00063 { 00064 public: 00065 FieldLines6x4(float length, float width); 00066 virtual ~FieldLines6x4(); 00067 00068 private: 00069 virtual void init(); 00070 }; 00071 00072 class FieldLinesCityTower: public FieldLines 00073 { 00074 public: 00075 FieldLinesCityTower(float length, float width); 00076 virtual ~FieldLinesCityTower(); 00077 00078 private: 00079 virtual void init(); 00080 }; 00081 00082 class FieldLinesCityTowerSeminar: public FieldLines 00083 { 00084 public: 00085 FieldLinesCityTowerSeminar(float length, float width); 00086 virtual ~FieldLinesCityTowerSeminar(); 00087 00088 private: 00089 virtual void init(); 00090 }; 00091 00092 } // end namespace firevision 00093 00094 #endif