Voili voilou

Dependencies:   RoboClaw StepperMotor mbed

Fork of Robot2016_2-0 by ARES

Committer:
IceTeam
Date:
Tue Jan 05 15:48:25 2016 +0100
Revision:
11:9c70a7f4d7aa
Ajout du fichier parent

Who changed what in which revision?

UserRevisionLine numberNew contents of line
IceTeam 11:9c70a7f4d7aa 1 #ifndef OBSTACLE_H_
IceTeam 11:9c70a7f4d7aa 2 #define OBSTACLE_H_
IceTeam 11:9c70a7f4d7aa 3
IceTeam 11:9c70a7f4d7aa 4 class Obstacle
IceTeam 11:9c70a7f4d7aa 5 {
IceTeam 11:9c70a7f4d7aa 6 public:
IceTeam 11:9c70a7f4d7aa 7 Obstacle(float robotRadius,int id);
IceTeam 11:9c70a7f4d7aa 8 virtual ~Obstacle();
IceTeam 11:9c70a7f4d7aa 9
IceTeam 11:9c70a7f4d7aa 10 virtual int height(float x, float y) = 0;
IceTeam 11:9c70a7f4d7aa 11
IceTeam 11:9c70a7f4d7aa 12 void setBigShape(bool bs) {bigShape = bs;}
IceTeam 11:9c70a7f4d7aa 13 bool isBigShape() {return bigShape;}
IceTeam 11:9c70a7f4d7aa 14
IceTeam 11:9c70a7f4d7aa 15 void setSmoothBigShape(bool sbs) {smoothBigShape = sbs;}
IceTeam 11:9c70a7f4d7aa 16 bool isSmoothBigShape() {return smoothBigShape;}
IceTeam 11:9c70a7f4d7aa 17
IceTeam 11:9c70a7f4d7aa 18 void setRobotRadius(float robotRadius) {this->robotRadius = robotRadius;}
IceTeam 11:9c70a7f4d7aa 19 float getRobotRadius() {return robotRadius;}
IceTeam 11:9c70a7f4d7aa 20
IceTeam 11:9c70a7f4d7aa 21 int getId(){return id;}
IceTeam 11:9c70a7f4d7aa 22 void setId(int id){this->id = id;}
IceTeam 11:9c70a7f4d7aa 23
IceTeam 11:9c70a7f4d7aa 24 void activate(){active=true;}
IceTeam 11:9c70a7f4d7aa 25 void desactivate(){active=false;}
IceTeam 11:9c70a7f4d7aa 26 protected:
IceTeam 11:9c70a7f4d7aa 27 bool bigShape,smoothBigShape;
IceTeam 11:9c70a7f4d7aa 28 bool active;
IceTeam 11:9c70a7f4d7aa 29 float robotRadius;
IceTeam 11:9c70a7f4d7aa 30
IceTeam 11:9c70a7f4d7aa 31 int id;
IceTeam 11:9c70a7f4d7aa 32 };
IceTeam 11:9c70a7f4d7aa 33
IceTeam 11:9c70a7f4d7aa 34 #endif