aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Fabre-Monplaisir <jean-isaac-fm@live.fr>2015-02-02 01:40:47 +0100
committerJean Fabre-Monplaisir <jean-isaac-fm@live.fr>2015-02-02 01:40:47 +0100
commite3420a0d3db79f0e0216c4fca2fc91078ddb4543 (patch)
treefc80a9e34aaa3709af6cf0545767159a715e6fa5
parent8d0312f1e4d348e8e2fd1f7198770f34f1d3a2b9 (diff)
downloadRobotique-Projet-e3420a0d3db79f0e0216c4fca2fc91078ddb4543.tar.gz
Robotique-Projet-e3420a0d3db79f0e0216c4fca2fc91078ddb4543.zip
line collisions
-rw-r--r--problem.cpp3
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;
}