123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- #pragma once
- #ifndef _RunGame_H_
- #define _RunGame_H_
- #include <vector>
- using namespace std;
- struct POS_X_CELL
- {
- //位置
- int pos_x;
- int pos_y;
- int pos_z;
- //角度
- int heading;
- int pitch;
- int zupt;
- };
- class RunGame
- {
- public:
- RunGame();
- int getResultLeftRight(int* pos, int devNum);
- int getResultJump(int jump);
- int getResultDown(int down);
- void setResultConLeft(int zupt);
- void setResultConRight(int zupt);
- int getResultLeft(int *pos, int girl_shoes, float pitch);
- int getResultRight(int* pos, int girl_shoes, float pitch);
- //void Process(int* right_pos, int* right_att, int right_zupt, int* left_pos,
- // int* left_att, int left_zupt, int jump, int down, int girl_shoes);
- void Process(int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_press,
- int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_press,
- int jump, int down, int rssi);
- void getResult(int *dec);
- int getAccStatus(int zupt, int* acc, int* max_acc, int* min_acc);
- void setGameheading(int left_zupt, int right_zupt, float left_heading, float right_heading, int rssi);
- void rotateGamePos(int* pos, int left_or_right);
- float getGamePos(int left_or_right, int index);
- //int calResult(vector<POS_X_CELL> &q, int last_zupt , int zupt, int left_or_right);
- private:
- int last_down;
- int last_jump;
- int left_has_result;
- int right_has_result;
- int left_zupt;
- int right_zupt;
- int left_pos_offset_min;
- int right_pos_offset_min;
- int left_last_pos[3];
- int right_last_pos[3];
- int result[4];
- int last_jump_time;
- int right_acc_status;
-
- int left_acc_status;
- int right_acc_max[3];
- int left_acc_max[3];
-
- int right_acc_min[3];
- int left_acc_min[3];
- //开局重置方向
- float left_reset_heading;
-
- float right_reset_heading;
-
- int has_init_heading;
- int zupt_count;
- //测试用的pos
- int left_game_pos[3];
- int right_game_pos[3];
- int last_left_zupt;
- int last_right_zupt;
- vector<POS_X_CELL> left_q;
- vector<POS_X_CELL> right_q;
- };
- #endif
|