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

📄 interceptutil.h

📁 自己写的robocup-2d程序
💻 H
字号:
#ifndef INTERCEPT_H
#define INTERCEPT_H


#include "WorldModel.h"
#include "Objects.h"      
#include "PlayerSettings.h" 

typedef struct TagInterceptInfo
{
//截球基本参数
	VecPosition Vel;

	ObjectT OppFastest;
	double OppCycles;

	ObjectT OurFastest;
	double OurCycles;
	VecPosition posEnd;
	
	bool isCaled;
} InterceptInfo;


class InterceptUtil	//using tsinghua method
{
public:
	//通常用于搜索:只是改变球速,其他如球员的参数不变
	//得到截球信息
	InterceptInfo* getInterceptInfo(const VecPosition& ballVel);
	int getInterceptCyc(const VecPosition& ballVel);
	//参数
	VecPosition ballPos;
	VecPosition playerPos, playerVel;
	double angBody;
	double maxSpeed;
	double maxDashEffect;
	double kickableArea;//kickArea是内部计算用的参数
private:
	double kickArea;//kickArea是内部计算用的参数
	void getinterceptioninfo2(const VecPosition& ballVel, InterceptInfo& inf);
	VecPosition calc_interception_solution(const VecPosition& startpoint, double ballspeed);
	double calc_peakpoint(const VecPosition& pos);
};

extern InterceptUtil interUtil;

#endif

⌨️ 快捷键说明

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