Voili voilou
Dependencies: RoboClaw StepperMotor mbed
Fork of Robot2016_2-0 by
Diff: Map/obsCarr.h
- Revision:
- 46:8eae88c45a78
diff -r b53ae54062c6 -r 8eae88c45a78 Map/obsCarr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Map/obsCarr.h Wed Apr 20 13:13:37 2016 +0000 @@ -0,0 +1,31 @@ +#ifndef OBSCARR_H +#define OBSCARR_H + +#include "controle.h" +#include "figure.h" +#include "point.h" + +class obsCarr : public figure { +public: + obsCarr (float xc, float yc, float dxt, float dyt) : figure (xc,yc) { + dxtaille = dxt; + dytaille = dyt; + } + + /* Retourne true si le segment AB croise le rectangle */ + bool getCroisement (point A, point B); + /* Retourne true si le segment AB croise le rectangle */ + bool getCroisement (float X, float Y, point B); + + /* Retourne 4 Points pas tres loin du rectangle par lesquels peut passer le robot ! */ + points4 getPoints (); + bool belongs (point& A); + + float getDXT () { return dxtaille; } + float getDYT () { return dytaille; } + +protected: + float dxtaille, dytaille; +}; + +#endif \ No newline at end of file