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_PLAYER_INTERCEPTION_H
00033 #define RCSC_PLAYER_INTERCEPTION_H
00034
00035 #include <rcsc/common/player_type.h>
00036 #include <rcsc/geom/vector_2d.h>
00037
00038 namespace rcsc {
00039
00044 class Interception {
00045 public:
00046 static const double NEVER_CYCLE;
00047
00048 private:
00050 const Vector2D M_ball_first_pos;
00052 const double M_ball_first_speed;
00054 const AngleDeg M_ball_vel_angle;
00055
00057 const double M_ball_x_constant;
00059 const double M_ball_x_d_constant;
00060
00061 public:
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 Interception( const Vector2D & ball_pos,
00073 const double & ball_first_speed,
00074 const AngleDeg & ball_vel_angle );
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084 Interception( const Vector2D & ball_pos,
00085 const Vector2D & ball_vel );
00086
00100 double getReachCycle( const Vector2D & player_pos,
00101 const Vector2D * player_vel,
00102 const AngleDeg * player_angle,
00103 const int player_count,
00104 const double & control_buf,
00105 const double & player_max_speed ) const;
00106
00119 double getReachCycleGreedly( const Vector2D & player_pos,
00120 const Vector2D * player_vel,
00121 const AngleDeg * player_angle,
00122 const int player_count,
00123 const double & control_buf,
00124 const double & player_max_speed ) const;
00125
00126 };
00127
00128 }
00129
00130 #endif