Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Map/Obstacles/Obstacle.h@0:b127c787a51b, 2015-05-24 (annotated)
- Committer:
- Jagang
- Date:
- Sun May 24 12:30:47 2015 +0000
- Revision:
- 0:b127c787a51b
Nettoyage du code d'asserv.; L'asserv ne fonctionne plus, juste test, moteurs ? 20% sur 1m
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jagang | 0:b127c787a51b | 1 | #ifndef OBSTACLE_H_ |
Jagang | 0:b127c787a51b | 2 | #define OBSTACLE_H_ |
Jagang | 0:b127c787a51b | 3 | |
Jagang | 0:b127c787a51b | 4 | class Obstacle |
Jagang | 0:b127c787a51b | 5 | { |
Jagang | 0:b127c787a51b | 6 | public: |
Jagang | 0:b127c787a51b | 7 | Obstacle(float robotRadius,int id); |
Jagang | 0:b127c787a51b | 8 | virtual ~Obstacle(); |
Jagang | 0:b127c787a51b | 9 | |
Jagang | 0:b127c787a51b | 10 | virtual int height(float x, float y) = 0; |
Jagang | 0:b127c787a51b | 11 | |
Jagang | 0:b127c787a51b | 12 | void setBigShape(bool bs) {bigShape = bs;} |
Jagang | 0:b127c787a51b | 13 | bool isBigShape() {return bigShape;} |
Jagang | 0:b127c787a51b | 14 | |
Jagang | 0:b127c787a51b | 15 | void setSmoothBigShape(bool sbs) {smoothBigShape = sbs;} |
Jagang | 0:b127c787a51b | 16 | bool isSmoothBigShape() {return smoothBigShape;} |
Jagang | 0:b127c787a51b | 17 | |
Jagang | 0:b127c787a51b | 18 | void setRobotRadius(float robotRadius) {this->robotRadius = robotRadius;} |
Jagang | 0:b127c787a51b | 19 | float getRobotRadius() {return robotRadius;} |
Jagang | 0:b127c787a51b | 20 | |
Jagang | 0:b127c787a51b | 21 | int getId(){return id;} |
Jagang | 0:b127c787a51b | 22 | void setId(int id){this->id = id;} |
Jagang | 0:b127c787a51b | 23 | |
Jagang | 0:b127c787a51b | 24 | void activate(){active=true;} |
Jagang | 0:b127c787a51b | 25 | void desactivate(){active=false;} |
Jagang | 0:b127c787a51b | 26 | |
Jagang | 0:b127c787a51b | 27 | virtual void update(float dt){} |
Jagang | 0:b127c787a51b | 28 | protected: |
Jagang | 0:b127c787a51b | 29 | bool bigShape,smoothBigShape; |
Jagang | 0:b127c787a51b | 30 | bool active; |
Jagang | 0:b127c787a51b | 31 | float robotRadius; |
Jagang | 0:b127c787a51b | 32 | |
Jagang | 0:b127c787a51b | 33 | int id; |
Jagang | 0:b127c787a51b | 34 | }; |
Jagang | 0:b127c787a51b | 35 | |
Jagang | 0:b127c787a51b | 36 | #endif |