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

📄 basicturn.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: Mohammad Salehe * *  Released on Monday 1 August 2005, 10 Mordad 1384 by Mersad RoboCup Team. *  For more information please read README file.*/#ifndef __BASIC_TURN_H#define __BASIC_TURN_H#include <BasicAction.h>#ifndef NULL#	define NULL 0#endif // NULLclass Ball;class Player;class Body;class Object;class BasicTurn: public BasicAction{protected:	float deltaAngle;		float necessaryTurnAngle;	float requestedTargetAngle;	float performedTurnAngle;	float performedTurnMoment;	bool oneTurnPossible;	Command *turnCommand;public:	BasicTurn(ActionType creator);	virtual Command *getCommand() = 0;		float getDeltaAngle();		float getNecessaryTurnAngle();	float getRequestedTargetAngle();	float getPerformedTurnAngle();	float getPerformedTurnMoment();	bool isOneTurnPossible();	// static functions for public turn-related calculations	static float getTurnMoment(float angle, const Player &player);	static float getTurnAngle(float moment, const Player &player);	static int actionsToTurnAngle(float angle, const Player &player,			float maxDeltaAngle = 0);};class TurnAngle: public BasicTurn{protected:	public:	TurnAngle(ActionType creator, float angle, const Body &body, float maxDeltaAngle = 0);	virtual Command *getCommand();};class TurnToAngle: public BasicTurn{protected:	public:	TurnToAngle(ActionType creator, float angle, const Body &body, float maxDeltaAngle = 0);	virtual Command *getCommand();};class TurnToPoint: public BasicTurn{protected:	public:	TurnToPoint(ActionType creator, const Point &point, const Body &body, float maxDeltaAngle = 0);	virtual Command *getCommand();};class TurnToObject: public BasicTurn{protected:	public:	TurnToObject(ActionType creator, const Object &object, const Body &body, float maxDeltaAngle = 0);	virtual Command *getCommand();};#endif // __BASIC_TURN_H

⌨️ 快捷键说明

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