field.h

00001 
00002 /***************************************************************************
00003  *  field.h - Encapsulates a soccer field
00004  *
00005  *  Created:  Tue Sep 23 12:00:00 2008
00006  *  Copyright 2008 Christof Rath <christof.rath@gmail.com>
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.
00014  *
00015  *  This program is distributed in the hope that it will be useful,
00016  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  *  GNU Library General Public License for more details.
00019  *
00020  *  Read the full text in the LICENSE.GPL file in the doc directory.
00021  */
00022 
00023 #ifndef __FVUTILS_DRAW_FIELD_H_
00024 #define __FVUTILS_DRAW_FIELD_H_
00025 
00026 #include <fvutils/draw/field_lines.h>
00027 
00028 #include <string>
00029 #include <list>
00030 
00031 namespace firevision {
00032 #if 0 /* just to make Emacs auto-indent happy */
00033 }
00034 #endif
00035 
00036 typedef std::list<fawkes::cart_coord_2d_t> fld_line_points_t;
00037 
00038 class Field
00039 {
00040 public:
00041   ~Field();
00042 
00043   const FieldLines& get_lines() const { return *__lines; }
00044   float get_field_length() const;
00045   float get_field_width() const;
00046 
00047   void print(bool in_mm) const;
00048 
00049   static Field* field_for_name(std::string field_name, float field_length, float field_width);
00050 
00051 private:
00052   Field(FieldLines *lines, bool manage_lines_memory = true);
00053 
00054   FieldLines  *__lines;
00055   bool         __manage_lines_memory;
00056 };
00057 
00058 } // end namespace firevision
00059 
00060 #endif

Generated on Tue Feb 22 13:31:16 2011 for Fawkes API by  doxygen 1.4.7