diff options
author | Jean Fabre-Monplaisir <jean-isaac-fm@live.fr> | 2015-02-02 01:40:47 +0100 |
---|---|---|
committer | Jean Fabre-Monplaisir <jean-isaac-fm@live.fr> | 2015-02-02 01:40:47 +0100 |
commit | e3420a0d3db79f0e0216c4fca2fc91078ddb4543 (patch) | |
tree | fc80a9e34aaa3709af6cf0545767159a715e6fa5 | |
parent | 8d0312f1e4d348e8e2fd1f7198770f34f1d3a2b9 (diff) | |
download | Robotique-Projet-e3420a0d3db79f0e0216c4fca2fc91078ddb4543.tar.gz Robotique-Projet-e3420a0d3db79f0e0216c4fca2fc91078ddb4543.zip |
line collisions
-rw-r--r-- | problem.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/problem.cpp b/problem.cpp index de6461e..a6d48c5 100644 --- a/problem.cpp +++ b/problem.cpp @@ -66,7 +66,8 @@ bool hilare_a_mvt::intersects(const obstacle &o) const { return false; } - if (o.c.r >= segment(from.pos(),to.pos()).dist(o.c.c))return true ; + if (o.c.r + p->r_c_car >= segment(from.pos(),to.pos()).dist(o.c.c)) return true ; + if (o.c.r + p->r_c_trolley >= segment(from.pos_trolley(),to.pos_trolley()).dist(o.c.c)) return true ; return false; } |