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

📄 body.h

📁 mersad源码 03年robocup 季军 可以研究一下大家
💻 H
字号:
/* *  Copyright 2002-2004, Mersad Team, Allame 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. * *  Created by: Ahmad Boorghany *  Released on Friday 1 April 2005 by Mersad RoboCup Team. *  For more information please read README file.*/#ifndef __BODY_H#define __BODY_H#include <Player.h>#include <Types.h>#ifndef NULL#	define NULL 0#endif // NULL#define UNUM_FAR_LENGTH 20.00#define UNUM_TOO_FAR_LENGTH 40.00#define TEAM_FAR_LENGTH 40.00#define TEAM_TOO_FAR_LENGTH 60.00class Command;class SExpression;class Body: public Player{protected:	float viewAngle;	TriAnswer collisionStatus;	// SenseBody items except stamina from Player	float effort; 	float speedAmount;	float speedDir;	float armTargetDist;	float armTargetDir;	unsigned kickCount;	unsigned dashCount;	unsigned turnCount;	unsigned sayCount;	unsigned turnNeckCount;	unsigned catchCount;	unsigned moveCount;	unsigned senseBodyCycle;	unsigned changeViewCount;	unsigned armMovable;	unsigned armExpires;	unsigned armCount;	unsigned tackleExpires;	unsigned tackleCount;	unsigned focusTargetUniNum;	unsigned focusCount;	TeamId focusTargetTeamId;	ViewModeWidth vmWidth;	ViewModeQuality vmQuality;	// Last counts	unsigned lastKickCount;	unsigned lastDashCount;	unsigned lastTurnCount;	unsigned lastSayCount;	unsigned lastTurnNeckCount;	unsigned lastCatchCount;	unsigned lastMoveCount;	unsigned lastChangeViewCount;	unsigned lastArmExpires;	unsigned lastArmCount;	unsigned lastFocusCount;	unsigned lastTackleExpires;	unsigned lastTackleCount;	// Local serverparam variables	float visibleDistance;public:	Body();	void simulateByDynamics(bool realBody = false);	void simulateByAction(const Command *bodyCycleCommand,			bool realBody = false);	void completeParseSenseBody();	void parseSenseBody(const SExpression &exp, Side OurFieldSide);	void update(FieldFlag **flags, FieldGoal **goals, FieldLine **lines,			unsigned flagsNum, unsigned goalsNum, unsigned linesNum);	virtual void setServerParamVars(const Param &serverParam);	float viewWidthToViewAngle(ViewModeWidth width) const;	// Counting functions	bool isKickCountChanged() const;	bool isDashCountChanged() const;	bool isTurnCountChanged() const;	bool isSayCountChanged() const;	bool isTurnNeckCountChanged() const;	bool isCatchCountChanged() const;	bool isMoveCountChanged() const;	bool isChangeViewCountChanged() const;	bool isArmExpiresChanged() const;	bool isArmCountChanged() const;	bool isFocusCountChanged() const;	bool isTackleExpiresChanged() const;	bool isTackleCountChanged() const;	// Getting functions	float getViewAngle() const;	TriAnswer getCollisionStatus() const;	float getEffort() const;	float getSpeedAmount() const;	float getSpeedDir() const;	float getArmTargetDist() const;	float getArmTargetDir() const;	unsigned getKickCount() const;	unsigned getDashCount() const;	unsigned getTurnCount() const;	unsigned getSayCount() const;	unsigned getTurnNeckCount() const;	unsigned getCatchCount() const;	unsigned getMoveCount() const;	unsigned getSenseBodyCycle() const;	unsigned getChangeViewCount() const;	unsigned getArmMovable() const;	unsigned getArmExpires() const;	unsigned getArmCount() const;	unsigned getTackleExpires() const;	unsigned getTackleCount() const;	unsigned getFocusTargetUniNum() const;	unsigned getFocusCount() const;	TeamId getFocusTargetTeamId() const;	ViewModeWidth getVMWidth() const;	ViewModeQuality getVMQuality() const;	float getVisibleDistance() const;	// Setting functions	void setViewAngle(float viewAngleArg);	void setCollisionStatus(TriAnswer collisionStatusArg);};#endif // __BODY_H

⌨️ 快捷键说明

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