⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basickick.h

📁 RoboCup 2D 仿真组老牌强队Mersad 2005的完整源代码
💻 H
字号:
/* *  Copyright 2002-2005, Mersad Team, Allameh Helli High School (NODET). * *  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. * *  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 Library General Public License for more details. * *  This file is created by: Mostafa Rokooey * *  Released on Monday 1 August 2005, 10 Mordad 1384 by Mersad RoboCup Team. *  For more information please read README file.*/#ifndef __BASIC_KICK_H#define __BASIC_KICK_H#include <Types.h>#include <Vector.h>#include <BasicAction.h>#ifndef NULL#	define NULL 0#endif // NULLclass Object;class Ball;class Player;class Body;class BasicKick: public BasicAction{protected:	Vector kickVector;	Vector trajectoryVector;	bool possibleFlag;public:	BasicKick(ActionType creator);	Vector getKickVec();	Vector getTrajVec();	bool isPossible();	float needKick(float power, const Body &body, const Ball &ball);	float directionOfMaxPowerKick(float direction, const Body &body,		const Ball &ball, float maxKickPower = 100);};class KickToDirectionVelocity: public BasicKick{protected:	float direction;	float velocity;	const Ball &ball;	const Body &body;	float possibleArea;	Command *kickCommand;public:	KickToDirectionVelocity(ActionType creator, float direction, float velocity, 		const Ball &ball, const Body &body, float possibleArea = 0);	virtual Command *getCommand();	};class KickToPointVelocity: public BasicKick{protected:	Point point;	float velocity;	const Ball &ball;	const Body &body;	float possibleArea;	Command *kickCommand;public:	KickToPointVelocity(ActionType creator, const Point &point, float velocity, const Ball &ball, 		const Body &body, float possibleArea = 0);	virtual Command *getCommand();};class KickToPointArriveVelocity: public BasicKick{protected:	Point point;	float velocity;	const Ball &ball;	const Body &body;	float possibleArea;	Command *kickCommand;public:	KickToPointArriveVelocity(ActionType creator, const Point &point, float velocity, const Ball &ball, 		const Body &body, float possibleArea = 0);	virtual Command *getCommand();};class KickToPointCycles: public BasicKick{protected:	Point point;	float cycles;	const Ball &ball;	const Body &body;	float possibleArea;	Command *kickCommand;public:	KickToPointCycles(ActionType creator, const Point &point, float cycles, const Ball &ball, const Body &body,		float possibleArea = 0);	virtual Command *getCommand();};class FastKickToDir: public BasicKick{protected:	float dir;	const Ball &ball;	const Body &body;	Command *kickCommand;public:	FastKickToDir(ActionType creator, float dir, const Ball &ball, const Body &body);	virtual Command *getCommand();};class FastKickToPoint: public BasicKick{protected:	Point point;	const Ball &ball;	const Body &body;	Command *kickCommand;public:	FastKickToPoint(ActionType creator, Point &point, const Ball &ball, const Body &body);	virtual Command *getCommand();};class StopBall: public BasicKick{protected:	const Ball &ball;	const Body &body;	float possibleArea;	Command *kickCommand;	public:	StopBall(ActionType creator, const Ball &ball, const Body &body, float possibleArea = 0);	virtual Command *getCommand();};#endif // __BASIC_DASH_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -