
Robot's source code
Dependencies: mbed
Diff: Map/Obstacles/Obs_circle.cpp
- Revision:
- 123:55e5e9acc541
- Parent:
- 109:53918ba98306
--- a/Map/Obstacles/Obs_circle.cpp Thu May 07 14:18:07 2015 +0000 +++ b/Map/Obstacles/Obs_circle.cpp Mon May 11 20:32:11 2015 +0000 @@ -1,6 +1,6 @@ #include "Obs_circle.h" -Obs_circle::Obs_circle(float robotRadius, float x, float y, float size):Obstacle(robotRadius) +Obs_circle::Obs_circle(float robotRadius, int id, float x, float y, float size):Obstacle(robotRadius,id) { this->x = x; this->y = y; @@ -9,6 +9,9 @@ int Obs_circle::height(float x, float y) { + if(!active) + return 0; + float d = (x-this->x)*(x-this->x) + (y-this->y)*(y-this->y); if(d <= size2) // On est dans le cercle {