ARES / Mbed 2 deprecated Robot 2016

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Obstacle.h Source File

Obstacle.h

00001 #ifndef OBSTACLE_H_
00002 #define OBSTACLE_H_
00003 
00004 class Obstacle
00005 {
00006     public:
00007         Obstacle(float robotRadius,int id);
00008         virtual ~Obstacle();
00009         
00010         virtual int height(float x, float y) = 0;
00011         
00012         void setBigShape(bool bs) {bigShape = bs;}
00013         bool isBigShape() {return bigShape;}
00014         
00015         void setSmoothBigShape(bool sbs) {smoothBigShape = sbs;}
00016         bool isSmoothBigShape() {return smoothBigShape;}
00017         
00018         void setRobotRadius(float robotRadius) {this->robotRadius = robotRadius;}
00019         float getRobotRadius() {return robotRadius;}
00020         
00021         int getId(){return id;}
00022         void setId(int id){this->id = id;}
00023         
00024         void activate(){active=true;}
00025         void desactivate(){active=false;}
00026         
00027         virtual void update(float dt){}
00028     protected:
00029         bool bigShape,smoothBigShape;
00030         bool active;
00031         float robotRadius;
00032         
00033         int id;
00034 };
00035 
00036 #endif