Fawkes API  Fawkes Development Version
globfromrel.h
1 
2 /***************************************************************************
3  * globfromrel.h - A simple implementation of the global position model for
4  * a ball
5  *
6  * Created: Fri Jun 03 22:56:22 2005
7  * Copyright 2005 Hu Yuxiao <Yuxiao.Hu@rwth-aachen.de>
8  * Tim Niemueller [www.niemueller.de]
9  *
10  ****************************************************************************/
11 
12 /* This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version. A runtime exception applies to
16  * this software (see LICENSE.GPL_WRE file mentioned below for details).
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU Library General Public License for more details.
22  *
23  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
24  */
25 
26 #ifndef _FIREVISION_MODELS_GLOBAL_POSITION_GLOBFROMREL_H_
27 #define _FIREVISION_MODELS_GLOBAL_POSITION_GLOBFROMREL_H_
28 
29 #include <fvmodels/global_position/globalpositionmodel.h>
30 
31 namespace firevision {
32 
33 class RelativePositionModel;
34 
35 class GlobalFromRelativePos : public GlobalPositionModel
36 {
37 public:
38  GlobalFromRelativePos(RelativePositionModel *model);
39  virtual void set_robot_position(float x, float y, float ori);
40  virtual void set_position_in_image(unsigned int x, unsigned int y);
41  virtual float get_x(void) const;
42  virtual float get_y(void) const;
43 
44  virtual void calc();
45 
46  virtual bool is_pos_valid() const;
47 
48 private:
49  RelativePositionModel *m_pRelaModel;
50  float m_fPosX;
51  float m_fPosY;
52  float m_fPhi;
53 };
54 
55 } // end namespace firevision
56 
57 #endif
firevision::RelativePositionModel
Definition: relativepositionmodel.h:37
firevision::GlobalFromRelativePos::GlobalFromRelativePos
GlobalFromRelativePos(RelativePositionModel *model)
Constructor.
Definition: globfromrel.cpp:47
firevision::GlobalFromRelativePos::set_robot_position
virtual void set_robot_position(float x, float y, float ori)
Definition: globfromrel.cpp:56
firevision::GlobalFromRelativePos::get_x
virtual float get_x(void) const
Definition: globfromrel.cpp:80
firevision::GlobalFromRelativePos::get_y
virtual float get_y(void) const
Definition: globfromrel.cpp:99
firevision::GlobalFromRelativePos::calc
virtual void calc()
Definition: globfromrel.cpp:69
firevision::GlobalFromRelativePos::set_position_in_image
virtual void set_position_in_image(unsigned int x, unsigned int y)
Definition: globfromrel.cpp:64
firevision::GlobalFromRelativePos::is_pos_valid
virtual bool is_pos_valid() const
Definition: globfromrel.cpp:74