From 71df5a8b964969a38e4b4c36a1614b17e274bc2e Mon Sep 17 00:00:00 2001
From: Joseph Mirabel <jmirabel@laas.fr>
Date: Wed, 25 Oct 2017 17:42:58 +0200
Subject: [PATCH] Remove WaypointEdge::direction.

---
 include/hpp/manipulation/graph/edge.hh |  2 --
 src/graph/edge.cc                      | 22 ----------------------
 2 files changed, 24 deletions(-)

diff --git a/include/hpp/manipulation/graph/edge.hh b/include/hpp/manipulation/graph/edge.hh
index b8e06466..43172d27 100644
--- a/include/hpp/manipulation/graph/edge.hh
+++ b/include/hpp/manipulation/graph/edge.hh
@@ -232,8 +232,6 @@ namespace hpp {
 	   const GraphWkPtr_t& graph, const StateWkPtr_t& from,
 	   const StateWkPtr_t& to);
 
-          virtual bool direction (const core::PathPtr_t& path) const;
-
           virtual bool canConnect (ConfigurationIn_t q1, ConfigurationIn_t q2) const;
 
           virtual bool build (core::PathPtr_t& path, ConfigurationIn_t q1, ConfigurationIn_t q2) const;
diff --git a/src/graph/edge.cc b/src/graph/edge.cc
index bacf320c..ebad3265 100644
--- a/src/graph/edge.cc
+++ b/src/graph/edge.cc
@@ -85,28 +85,6 @@ namespace hpp {
         return !(src_contains_q0 && (!src_contains_q1 || dst_contains_q1));
       }
 
-      bool WaypointEdge::direction (const core::PathPtr_t& path) const
-      {
-        Configuration_t q0 = path->initial (),
-                        q1 = path->end ();
-        const bool src_contains_q0 = waypoints_.back().second->contains (q0);
-        const bool dst_contains_q0 = to  ()->contains (q0);
-        const bool src_contains_q1 = waypoints_.back().second->contains (q1);
-        const bool dst_contains_q1 = to  ()->contains (q1);
-
-        /// See Edge::direction for Karnaugh table
-        /// true if reverse
-        if (   (!src_contains_q0 && !src_contains_q1)
-            || (!dst_contains_q0 && !dst_contains_q1)
-            || (!src_contains_q0 && !dst_contains_q0))
-          HPP_THROW (std::runtime_error,
-              "Edge " << name() << " does not seem to have generated path from"
-              << pinocchio::displayConfig(q0) << " to "
-              << pinocchio::displayConfig(q1)
-              );
-        return !(src_contains_q0 && (!src_contains_q1 || dst_contains_q1));
-      }
-
       bool Edge::intersectionConstraint (const EdgePtr_t& other,
           ConfigProjectorPtr_t proj) const
       {
-- 
GitLab