00001
00002
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00031
00032 #ifndef RCSC_ACTION_BODY_KICK_TO_RELATIVE_H
00033 #define RCSC_ACTION_BODY_KICK_TO_RELATIVE_H
00034
00035 #include <rcsc/player/soccer_action.h>
00036 #include <rcsc/geom/angle_deg.h>
00037
00038 namespace rcsc {
00039
00040 class Vector2D;
00041 class WorldModel;
00042
00050 class Body_KickToRelative
00051 : public BodyAction {
00052 private:
00054 static const size_t DEFAULT_KICK_QUEUE_MAX;
00055
00057 const double M_target_dist;
00059 const AngleDeg M_target_angle_relative;
00061 const bool M_stop_ball;
00062
00063 public:
00070 Body_KickToRelative( const double & target_dist,
00071 const AngleDeg & target_angle_relative,
00072 const bool stop )
00073 : M_target_dist( target_dist )
00074 , M_target_angle_relative( target_angle_relative )
00075 , M_stop_ball( stop )
00076 { }
00077
00083 bool execute( PlayerAgent * agent );
00084
00085 private:
00095 bool simulate( const WorldModel & wm,
00096 const bool reverse,
00097 Vector2D * required_accel );
00098
00099 };
00100
00101 }
00102
00103 #endif