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
Diff: Map/Obstacles/Obs_circle.cpp
- Revision:
- 47:be4eebf40568
- Parent:
- 45:b53ae54062c6
- Child:
- 49:5e2f7323f280
--- a/Map/Obstacles/Obs_circle.cpp Wed Apr 13 12:47:47 2016 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#include "Obs_circle.h"
-
-Obs_circle::Obs_circle(float robotRadius, int id, float x, float y, float size):Obstacle(robotRadius,id)
-{
- this->x = x;
- this->y = y;
- this->size2 = size*size;
-}
-
-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
- {
- return 32000; // Interdit
- }
- else if(bigShape && d <= size2+robotRadius*robotRadius) // On est dans le grand cercle
- {
- if(!smoothBigShape)
- return 32000; // Interdit
- else
- {
- return 32000; // Interdit
- }
- }
- return 0;
-}
