📄 soccerscene.h
字号:
/*************************************************************************** * Copyright (C) 2004 - 2006 by ZJUBase *
* National Lab of Industrial Control Tech. * * Zhejiang University, China * * * * Achievements of ZJUBase in RoboCup Soccer 3D Simulation League: *
* In RoboCup championship, *
* - June 2006 - 3rd place in RoboCup 2006, Bremen, Germany (lost * * the semi-final with a coin toss) *
* - July 2005 - 3rd place in RoboCup 2005, Osaka, Japan (share the * * 3rd place with team Caspian) *
* In RoboCup local events, *
* - April 2006 - 2nd place in RoboCup Iran Open 2006, Tehran, Iran * * (lost the final with a coin toss) *
* - December 2005 - 2nd place in AI Games 2005, Isfahan, Iran *
* - July 2005 - champion in China Robot Competition 2005, Changzhou, * * China *
* - October 2004 - champion in China Soccer Robot Competition 2004, * * Guangzhou, China *
* * * Team members: *
* Currently the team leader is, * * Hao JIANG (jianghao@iipc.zju.edu.cn; riveria@gmail.com) *
* In the next season, the leader will be * * Yifeng ZHANG (yfzhang@iipc.zju.edu.cn) *
* ZJUBase 3D agent is created by * * Dijun LUO (djluo@iipc.zju.edu.cn) *
* All the members who has ever contributed: * * Jun JIANG *
* Xinfeng DU (xfdu@iipc.zju.edu.cn) *
* Yang ZHOU (yzhou@iipc.zju.edu.cn) *
* Zhipeng YANG *
* Xiang FAN *
* *
* Team Manager: *
* Ms. Rong XIONG (rxiong@iipc.zju.edu.cn) *
* *
* If you met any problems or you have something to discuss about * * ZJUBase. Please feel free to contact us through EMails given below. * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/#ifndef SOCCERSCENE_H#define SOCCERSCENE_H#include "SoccerAction.h"#include "Situation.h"#include "ServerSettings.h"#include "Intercept.h"
class SoccerScene {public: SoccerScene(); virtual ~SoccerScene();
virtual bool isValid(); virtual void Execute();
void reset(); void addAction(SoccerAction a); void AddCommand(SoccerCommand cmd); void AddCommand(SoccerCommand cmd1,SoccerCommand cmd2); void AddCommandQueue(CommandQueue cmds);
//================== int ivalue[10]; double dvalue[10]; Vector3 vvalue[10];
//===================== bool valid; bool enoughReturn; static Situation *ST; static ServerSettings *SS; Intercept intercept;
//================== bool EnoughReturn() { return enoughReturn;} static void Init(ServerSettings *ss,Situation *st) { SS = ss; ST = st;}};
class SCENE_before_kick_off : public SoccerScene//{ public: bool isValid(); void Execute(); SCENE_before_kick_off(); virtual ~SCENE_before_kick_off();};
class SCENE_long_pass : public SoccerScene //the pass that flying in the sky{public: bool isValid(); void Execute(); SCENE_long_pass(); virtual ~SCENE_long_pass();};
class SCENE_short_pass : public SoccerScene //the pass that on the ground{
public: bool isValid(); void Execute(); SCENE_short_pass(); virtual ~SCENE_short_pass();};
class SCENE_intercept : public SoccerScene{
public: bool isValid(); void Execute(); SCENE_intercept(); virtual ~SCENE_intercept();};
class SCENE_dribbling : public SoccerScene{
public: bool isValid(); void Execute(); SCENE_dribbling(); virtual ~SCENE_dribbling();};
class SCENE_corner_kick : public SoccerScene{
public: bool isValid(); void Execute(); SCENE_corner_kick(); virtual ~SCENE_corner_kick();};
class SCENE_goal_kick : public SoccerScene{
public: bool isValid(); void Execute(); SCENE_goal_kick(); virtual ~SCENE_goal_kick();};
class SCENE_throw_in : public SoccerScene{
public: bool isValid(); void Execute(); SCENE_throw_in(); virtual ~SCENE_throw_in();};
class SCENE_shoot : public SoccerScene{ public: bool isValid(); void Execute(); SCENE_shoot(); virtual ~SCENE_shoot();
private: bool isOneToOneToGoal();
private: bool getPassVel(double &power,double & theta); Angle getKickAngle(); Vector3 getWhereToKickTo(); double EvaluatePassPoint(Vector3 p); Vector3 getBestPassPoint(); void getConsiderPassPoint(vector<Vector3>& points);};
class SCENE_pass : public SoccerScene{public: bool isValid(); void Execute(); SCENE_pass(); virtual ~SCENE_pass();
private: Vector3 getBestPassPoint(); bool getPassVel(double &power,double & theta); Angle getKickAngle(); Vector3 getWhereToKickTo(); double EvaluatePassPoint(Vector3 p); void getConsiderPassPoint(vector<Vector3>& points);
private: Vector3 mLastPass;};
class SCENE_normal : public SoccerScene{ public: bool isValid(); void Execute(); SCENE_normal (); virtual ~SCENE_normal ();};
class SCENE_pass_center : public SoccerScene{ public: bool isValid(); void Execute(); SCENE_pass_center (); virtual ~SCENE_pass_center ();};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -