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.
Fork of Timer by
Map/Obstacles/Obstacle.h@11:9c70a7f4d7aa, 2016-01-05 (annotated)
- Committer:
- IceTeam
- Date:
- Tue Jan 05 15:48:25 2016 +0100
- Revision:
- 11:9c70a7f4d7aa
Ajout du fichier parent
Who changed what in which revision?
| User | Revision | Line number | New 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 |
