player_intercept.h

説明を見る。
00001 // -*-c++-*-
00002 
00008 /*
00009  *Copyright:
00010 
00011  Copyright (C) Hidehisa AKIYAMA
00012 
00013  This code is free software; you can redistribute it and/or
00014  modify it under the terms of the GNU Lesser General Public
00015  License as published by the Free Software Foundation; either
00016  version 2.1 of the License, or (at your option) any later version.
00017 
00018  This library 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 GNU
00021  Lesser General Public License for more details.
00022 
00023  You should have received a copy of the GNU Lesser General Public
00024  License along with this library; if not, write to the Free Software
00025  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026 
00027  *EndCopyright:
00028  */
00029 
00031 
00032 #ifndef RCSC_PLAYER_PLAYER_INTERCEPT_H
00033 #define RCSC_PLAYER_PLAYER_INTERCEPT_H
00034 
00035 #include <rcsc/geom/vector_2d.h>
00036 #include <vector>
00037 
00038 namespace rcsc {
00039 
00040 class PlayerType;
00041 class BallObject;
00042 class PlayerObject;
00043 class WorldModel;
00044 
00049 class PlayerIntercept {
00050 private:
00052     const WorldModel & M_world;
00054     const std::vector< Vector2D > & M_ball_pos_cache;
00055 
00056     // not used
00057     PlayerIntercept();
00058 
00059 public:
00060 
00066     PlayerIntercept( const WorldModel & world,
00067                      const std::vector< Vector2D > & ball_pos_cache )
00068         : M_world( world )
00069         , M_ball_pos_cache( ball_pos_cache )
00070       { }
00071 
00075     ~PlayerIntercept()
00076       { }
00077 
00079 
00086     int predict( const PlayerObject & player,
00087                  const PlayerType & player_type,
00088                  const int max_cycle ) const;
00089 
00090 private:
00100     bool canReachAfterTurnDash( const int cycle,
00101                                 const PlayerObject & player,
00102                                 const PlayerType & player_type,
00103                                 const double & control_area,
00104                                 const Vector2D & ball_pos ) const;
00105 
00115     int predictTurnCycle( const int cycle,
00116                           const PlayerObject & player,
00117                           const PlayerType & player_type,
00118                           const double & control_aera,
00119                           const Vector2D & ball_pos ) const;
00120 
00131     bool canReachAfterDash( const int n_turn,
00132                             const int n_dash,
00133                             const PlayerObject & player,
00134                             const PlayerType & player_type,
00135                             const double & control_area,
00136                             const Vector2D & ball_pos ) const;
00137 
00144     int predictFinal( const PlayerObject & player,
00145                       const PlayerType & player_type ) const;
00146 
00147 };
00148 
00149 }
00150 
00151 #endif

librcscに対してThu May 1 15:41:21 2008に生成されました。  doxygen 1.5.0