📄 dribble.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 * * Released on Monday 1 August 2005, 10 Mordad 1384 by Mersad RoboCup Team. * For more information please read README file.*/#ifndef __DRIBBLE_H#define __DRIBBLE_H#include <AdvancedAction.h>#define DRIBBLE_BLOCK_MAX_WEIGHT 60#define DRIBBLE_BLOCK_DIST_RATE 0.75#define DRIBBLE_BLOCK_DIR_RATE 0.25class Dribble : public AdvancedAction{protected: void setDribbleArgumentsByOpponent(); void setAngleWeight(int targetCount); void setCraudWeight(int targetCount); void setTargetWeight(int targetCount); void setDribbleTarget(); void setOpponentInWeight(float senceArea); float isOpponent; int opponentInSence; int targetNums; float targetAngles[40]; float targetWeights[40]; float cautionLength; float angleWeightRate; float craudWeightRate; void setDribblePoints(); int bestDribblePoint(); bool checkDribbleTarget(int dribbleCount); void setPathWithOpponentInSence(int dribbleCount,int opponentInSence); Point setByPointInformation(float pointBodyAngle, float cautionDistance); void setDribbleTarget(int dribbleCount); float getInlineDribbleWeight(int dribbleCount, float senceArea); float getBlockedWeight(); float getBodyCrossWeight(); float getPlayerBlockWeight(const Player &player); bool ballInOppKickable(); Command *dribbleCommand; Point dribbleTargets[11]; Point dribblePoints[12]; Point virtualDribblePoints[12]; Point dribblePoint; Ball checkTargetBall; Body checkTargetBody; Point dribbleTarget; Point idealDribbleTarget; float dribbleWeights[12]; float kickPower[12]; int virtualWeight[12]; float angle[12]; float noise1[12]; float noise2[12]; float dashPower[12]; float maxDist[12]; int cycleNums[12]; float kickableNoise[12]; float angleNoise[12];public: Dribble(const WorldModel *worldModel); virtual ~Dribble(); virtual void execute(Form &form, const Library &library); virtual float getValue(const Library &library);};class DribblePath{protected : int bestDribbleTarget; void setAngleWeight(int targetCount); void setCraudWeight(int targetCount); void setTargetWeight(int targetCount); void setDribbleTarget(); float isOpponent; Point beginPoint; Point dribbleTarget; int targetNums; float targetAngles[40]; float targetWeights[40]; float cautionLength; float angleWeightRate; float xRate; float craudWeightRate; const WorldModel *worldModel; public : DribblePath(const WorldModel *worldModel); void setDefaultParams(); void setPathParams(int targetNumsArg, float cautionLengthArg, float angleWeightRateArg, float craudWeightRateArg, float xRateArg); void setBeginPoint(Point beginPointArg); float getBestTargetWeight(); float getTargetWeight(int targetCount); float getBestTargetDir();};#endif // __DRIBBLE_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -