Romain Ame / Mbed 2 deprecated Robot2016_2-0_STATIC

Dependencies:   RoboClaw StepperMotor mbed

Fork of Robot2016_2-0 by ARES

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers obsCarr.h Source File

obsCarr.h

00001 #ifndef OBSCARR_H
00002 #define OBSCARR_H
00003 
00004 #include "controle.h"
00005 #include "figure.h"
00006 #include "point.h"
00007 
00008 class obsCarr : public figure {
00009 public:
00010     obsCarr (float xc, float yc, float dxt, float dyt) : figure (xc,yc) {
00011         dxtaille = dxt;
00012         dytaille = dyt;
00013     }
00014 
00015     /* Retourne true si le segment AB croise le rectangle */
00016     bool getCroisement (point A, point B);
00017     /* Retourne true si le segment AB croise le rectangle */
00018     bool getCroisement (float X, float Y, point B);
00019 
00020     /* Retourne 4 Points pas tres loin du rectangle par lesquels peut passer le robot ! */
00021     points4 getPoints ();
00022     bool belongs (point& A);
00023 
00024     float getDXT () { return dxtaille; }
00025     float getDYT () { return dytaille; }
00026 
00027 protected:
00028     float dxtaille, dytaille;
00029 };
00030 
00031 #endif