48 lines
830 B
C
48 lines
830 B
C
#ifndef __MY_VERTIX_H__
|
|
#define __MY_VERTIX_H__
|
|
|
|
typedef struct {
|
|
int from;
|
|
int to;
|
|
} time_period_t;
|
|
|
|
typedef struct {
|
|
// 如果in为0,则表示需要再这段时间,否则,表示在这段时间之外
|
|
bool in;
|
|
int size;
|
|
time_period_t *periods;
|
|
} time_gap_t;
|
|
|
|
extern time_gap_t global_time_gap;
|
|
|
|
|
|
int should_do_judge_according_time();
|
|
|
|
// 获取今天的秒数
|
|
int get_today_seconds();
|
|
|
|
// 将16:05:00类似的字符串,转换成一天的秒数
|
|
int get_all_time_period_from_arguments(const char *str);
|
|
|
|
|
|
typedef struct
|
|
{
|
|
float x;
|
|
float y;
|
|
} Point;
|
|
|
|
typedef struct
|
|
{
|
|
int numVertix;
|
|
Point *vertix;
|
|
} Polygon;
|
|
|
|
extern Polygon workspace;
|
|
|
|
#define DUMP_POLYGON_INFO
|
|
|
|
void init_polygon(float *datas, int size);
|
|
|
|
bool is_point_in_workspace(int left, int top, int right, int bottom);
|
|
|
|
#endif |