diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-01-08 16:33:13 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-01-08 16:33:13 +0100 |
commit | 8aa7f2ee67640b6c76b45f99905529ef01078509 (patch) | |
tree | b88397d73747385fb20200977cca76588cb646a0 /problem.cpp | |
parent | 3e7f796b17150cb96b332c619271152df3015756 (diff) | |
download | Robotique-Projet-8aa7f2ee67640b6c76b45f99905529ef01078509.tar.gz Robotique-Projet-8aa7f2ee67640b6c76b45f99905529ef01078509.zip |
Add geometry & problem description
Diffstat (limited to 'problem.cpp')
-rw-r--r-- | problem.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/problem.cpp b/problem.cpp new file mode 100644 index 0000000..c196879 --- /dev/null +++ b/problem.cpp @@ -0,0 +1,35 @@ +#include "problem.hpp" + +using namespace std; + +// ===================================== // +// IMPLEMENTATION FOR CLASS HILARE_A_MVT // +// ===================================== // + +double hilare_a_mvt::length() { + // returns length traveled by the car + return domega * (center - from.pos()).norm(); +} + +bool hilare_a_mvt::intersects(const obstacle &o) const { + // TODO + return false; +} + +bool hilare_a_mvt::intersects(const problem &p) const { + for (auto i = p.map.begin(); i != p.map.end(); i++) { + if (intersects(*i)) return true; + } + return false; +} + +// ================================= // +// IMPLEMENTATION FOR CLASS SOLUTION // +// ================================= // + +solution solution::direct_sol(const hilare_a &pos_a, const hilare_a &pos_b) { + // TODO: try different possibilities and chose the shortest one + return solution(vector<hilare_a_mvt>()); +} + +/* vim: set ts=4 sw=4 tw=0 noet :*/ |