globfromrel.h

00001
00002 /***************************************************************************
00003  *  globfromrel.h - A simple implementation of the global position model for
00004  *                 a ball
00005  *
00006  *  Created: Fri Jun 03 22:56:22 2005
00007  *  Copyright  2005  Hu Yuxiao <Yuxiao.Hu@rwth-aachen.de>
00008  *                   Tim Niemueller [www.niemueller.de]
00009  *
00010  ****************************************************************************/
00011
00012 /*  This program is free software; you can redistribute it and/or modify
00013  *  it under the terms of the GNU General Public License as published by
00014  *  the Free Software Foundation; either version 2 of the License, or
00015  *  (at your option) any later version. A runtime exception applies to
00016  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00017  *
00018  *  This program is distributed in the hope that it will be useful,
00019  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  *  GNU Library General Public License for more details.
00022  *
00023  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00024  */
00025
00026 #ifndef __FIREVISION_MODELS_GLOBAL_POSITION_GLOBFROMREL_H_
00027 #define __FIREVISION_MODELS_GLOBAL_POSITION_GLOBFROMREL_H_
00028 
00029 #include <models/global_position/globalpositionmodel.h>
00030
00031 class RelativePositionModel;
00032
00033 class GlobalFromRelativePos : public GlobalPositionModel
00034 {
00035  public:
00036   GlobalFromRelativePos(RelativePositionModel* model);
00037   virtual void  set_robot_position(float x, float y, float ori);
00038   virtual void  set_position_in_image(unsigned int x, unsigned int y);
00039   virtual float get_x(void) const;
00040   virtual float get_y(void) const;
00041
00042   virtual void  calc();
00043
00044   virtual bool  is_pos_valid() const;
00045
00046  private:
00047   RelativePositionModel *m_pRelaModel;
00048   float                  m_fPosX;
00049   float                  m_fPosY;
00050   float                  m_fPhi;
00051
00052 };
00053
00054 #endif