📄 defines.h
字号:
/**
* @file 一些数据结构和宏定义
* @author peter@mail.ustc.edu.cn
*/
#ifndef _DEFINES_H_
#define _DEFINES_H_
#include "types.h"
#define PI 3.1415926538
#define FONT_SIZE 3.0
#define CIRCLE_ARC 7.1
#define TOP_MARGIN 7.0
#define PENALTY_CIRCLE_R 9.15
#define COLOR_BLACK RGB(0,0,0)
#define COLOR_RED RGB(200,0,0)
#define COLOR_YELLOW RGB(255,255,10)
#define COLOR_WHITE RGB(255,255,255)
#define COLOR_PINK RGB(213,117,117)
#define COLOR_DARKGREEN RGB(0, 96, 0)
#define COLOR_GREEN RGB(20, 250, 20)
#define COLOR_LIGHTGREEN RGB(20,150,20)
#define COLOR_LIGHTBLUE RGB(55, 255, 255)
#define COLOR_BLUE RGB(128,255,255)
#define COLOR_PURPLE RGB(255,0,255)
#define MSG_FOOTER "\t\t\t" // 用来标示一行结尾
#include <vector>
#include <string>
struct PlayerLog { //记录普通队员(自己以外的)的信息
char side; //队员所处的一边
char num; //队服号码
float x; //位置x分量
float y; //位置y分量
float valid; //位置有效程度
float vel_valid; //速度有效程度
float dir; //速度方向
float speed; //速率
};
struct SightLog {
short time; //当前场上时间
char my_num; //自己的队服号码
float my_x; //自己位置x分量
float my_y; //自己位置y分量
float my_conf; //自己位置有效程度
float my_velconf; //自己速度有效程度
float my_speed; //自己速率
float body_ang; //自己身体角度(弧度)
float head_ang; //自己脖子角度,相对于身体(弧度)
float view_width; //自己视角宽度(弧度)
float ball_conf; //球位置有效程度
float ball_x; //球位置x分量
float ball_y; //球位置y分量
float ball_velconf; //球速度有效程度
float ball_dir; //球速度x分量
float ball_speed; //球速度y分量
PlayerLog player[MAX_PLAYER * 2 - 1]; //最多21个其他队员
};
struct msg_pos_t{
short board;
short len;
char* pos;
};
struct my_msginfo_t{
short board ;
std::string message; // string比定长数组省资源
} ;
struct cycle_info_t{
short cycle;
bool valid;
bool bSight; // 用来标记是不是sightlog
showinfo_t2 show;
CString msg;
SightLog sight; // 我自己的log格式
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -