body_kick_multi_step.h

説明を見る。
00001 // -*-c++-*-
00002 
00009 /*
00010  *Copyright:
00011 
00012  Copyright (C) Hidehisa AKIYAMA
00013 
00014  This code is free software; you can redistribute it and/or
00015  modify it under the terms of the GNU Lesser General Public
00016  License as published by the Free Software Foundation; either
00017  version 2.1 of the License, or (at your option) any later version.
00018 
00019  This library is distributed in the hope that it will be useful,
00020  but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022  Lesser General Public License for more details.
00023 
00024  You should have received a copy of the GNU Lesser General Public
00025  License along with this library; if not, write to the Free Software
00026  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027 
00028  *EndCopyright:
00029  */
00030 
00032 
00033 #ifndef RCSC_ACTION_BODY_KICK_MULTI_STEP_H
00034 #define RCSC_ACTION_BODY_KICK_MULTI_STEP_H
00035 
00036 #include <rcsc/player/soccer_action.h>
00037 #include <rcsc/geom/vector_2d.h>
00038 
00039 namespace rcsc {
00040 
00047 class Body_KickMultiStep
00048     : public BodyAction {
00049 private:
00051     const Vector2D M_target_point;
00053     double M_first_speed;
00055     const bool M_enforce_kick;
00056 
00058     Vector2D M_ball_result_pos;
00060     Vector2D M_ball_result_vel;
00062     int M_kick_step;
00063 public:
00071     Body_KickMultiStep( const Vector2D & target_point,
00072                         const double & first_speed,
00073                         const bool enforce = false )
00074         : M_target_point( target_point )
00075         , M_first_speed( first_speed )
00076         , M_enforce_kick( enforce )
00077         , M_ball_result_pos( Vector2D::INVALIDATED )
00078         , M_ball_result_vel( Vector2D::INVALIDATED )
00079         , M_kick_step( 0 )
00080       { }
00081 
00087     bool execute( PlayerAgent * agent );
00088 
00089 
00094     const
00095     Vector2D & ballResultPos() const
00096       {
00097           return M_ball_result_pos;
00098       }
00099 
00104     const
00105     Vector2D & ballResultVel() const
00106       {
00107           return M_ball_result_vel;
00108       }
00109 
00114     int kickStep() const
00115       {
00116           return M_kick_step;
00117       }
00118 
00119 
00136     static
00137     bool simulate_three_kick( Vector2D * achieved_vel,
00138                               Vector2D * next_vel,
00139                               const Vector2D & target_rpos,
00140                               const double & first_speed,
00141                               const Vector2D & my_rpos,
00142                               const Vector2D & my_vel,
00143                               const AngleDeg & my_body,
00144                               const Vector2D & ball_rpos,
00145                               const Vector2D & ball_vel,
00146                               const PlayerAgent * agent,
00147                               const bool enforce );
00148 
00149 };
00150 
00151 }
00152 
00153 #endif

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