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

📄 basicdash.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: Meisam Vosoughpour, Mohammad Salehe * *  Released on Monday 1 August 2005, 10 Mordad 1384 by Mersad RoboCup Team. *  For more information please read README file.*/#ifndef __BASIC_DASH_H#define __BASIC_DASH_H#include <BasicAction.h>#include <WorldModel.h>#include <Types.h>#include <Config.h>#ifndef NULL#	define NULL 0#endif // NULLclass DashDribbleGotoBall: public BasicAction{protected:	Command *command;	public:	DashDribbleGotoBall(ActionType creator, const Ball &ball, const Body &body);	virtual Command *getCommand();};class DashNormalGotoPoint: public BasicAction{protected:	Command *command;	CommandType mode;	public:	DashNormalGotoPoint(ActionType creator, const Point &target, float distance, const Body &body,		float maxDashPower = 100);	DashNormalGotoPoint(ActionType creator, const Point &target, float distance, const Body &body, float idealBodyDir,		float maxDashPower);	CommandType getMode();	virtual Command *getCommand();};class ExactGotoPoint: public BasicAction{protected:	Command *command;	CommandType mode;public:	ExactGotoPoint::ExactGotoPoint(ActionType creator, Point targetPoint, float deltaDistance, 			const Body &body, bool negDashFlag = false);	void setDashPower(const Body &body, Point targetPoint, 			float defaultDashPower, float &dashPower);	CommandType getMode();	virtual Command *getCommand();};class PreciseGotoPoint: public BasicAction{protected:	Command *command;	CommandType mode;public:	PreciseGotoPoint::PreciseGotoPoint(ActionType creator, Point targetPoint, float deltaDistance, 			const Body &body, bool negDashFlag = false, float minTurnAngle = 20);	void setDashPower(const Body &body, Point targetPoint, 			float defaultDashPower, float &dashPower);	CommandType getMode();	virtual Command *getCommand();};/*class DashFarNormalGotoPoint: BasicAction{protected:	Point target;	float distance;	Body *body;	GotoPointMode mode;public:	DashFarNormalGotoPoint(const Point &target, float distance, Body *body,		GotoPointMode mode);	virtual Command *getCommand();};*//*class DashClear: BasicAction{protected:	Ball *ball;	Body *body;	bool isOpp;public:	DashClear(Ball *ball, Body *body, bool isOpp);	virtual Command *getCommand();};*/class FreeKickGotoPoint: public BasicAction{protected:	Command *command;	int status;	public:	FreeKickGotoPoint(ActionType creator, const Point &point, float standDirection,float collisionDistance,			const Body &body);		// Return Value = 0:arrived; 1:not arrived 	int getStatus() const;		virtual Command *getCommand();};class ForbiddenAreaGotoPoint: public BasicAction{protected:	Command *command;	int status;	bool forbiddenSourceFlag;	bool forbiddenTargetFlag;	int realTargetPlace;	Point realTargetPoint;	bool clockwiseFlag;	bool goAroundFlag;	public:	ForbiddenAreaGotoPoint(ActionType creator, const Point &point, float rectX1,			float rectY1, float rectY2,	const Body &body);	ForbiddenAreaGotoPoint(ActionType creator, const Point &point, Point &rectNW,		 Point &rectSE, const Body &body);	ForbiddenAreaGotoPoint(ActionType creator, const Point &point, Point circleCenter,			float circleRadius, const Body &body, bool forbiddenX = false);		virtual Command *getCommand();	bool isForbiddenSource() const;	bool isForbiddenTarget() const;	int getRealTargetPlace() const;	Point getRealTargetPoint() const;	bool isClockwise() const;	bool isGoAround() const;	// Return Value = 0:arrived; 1:not arrived 	int getStatus() const;	};#endif // __BASIC_DASH_H

⌨️ 快捷键说明

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