00001 #ifndef CIRCLE_OBSTACLE 00002 #define CIRCLE_OBSTACLE 00003 //============================================================================= 00004 // GlobalVision.h 00005 // - This class represents a global view of the field, compiled from data 00006 // collected from all the robots 00007 //============================================================================= 00008 //#include "GlobalObject.h" 00009 //#include <stddef.h> 00010 //const size_t NUM_OF_OBJECTS = 10; 00011 //CHANGE TO ACTUAL OBSTACLE (10) 00012 //#define MAX_OBSTACLES 14 00013 #define CIRCLE_OBSTACLE_MAX 6 00014 #include <chain.h> 00015 //class c_obstacle_chain 00016 //{ 00017 struct StaticCircleObstacle 00018 { 00019 short vx; 00020 short vy; 00021 short r; 00022 }; 00023 00024 class circle_obstacle_chain : public chain 00025 { 00026 public: 00027 // circle_obstacle_chain(const StaticCircleObstacle&); 00028 circle_obstacle_chain(void); 00029 bool append(const StaticCircleObstacle&); 00030 bool append(int ix, int iy, int ir); 00031 const StaticCircleObstacle serve(void); 00032 StaticCircleObstacle operator[](int) const; 00033 private: 00034 // unsigned int c_obstaclecount; 00035 // StaticCircleObstacle c_obstacle[CIRCLE_OBSTACLE_MAX]; 00036 StaticCircleObstacle _circle_obstacle_chain[CIRCLE_OBSTACLE_MAX]; 00037 }; 00038 00039 /* 00040 Maybe later... 00041 struct StaticPolyObstacle 00042 { 00043 float vx[3]; 00044 float vy[3]; 00045 }; 00046 00047 class p_obstacle_chain 00048 public: 00049 unsigned int p_obstaclecount; 00050 StaticPolyObstacle p_obstacle[MAX_OBSTACLES]; 00051 }; 00052 */ 00053 #endif 00054
1.3