From c6fbc1516b8203c21fbf48a857f494f77c2ee995 Mon Sep 17 00:00:00 2001
From: fvalenza <florian.valenza@gmail.com>
Date: Wed, 14 Sep 2016 16:02:47 +0200
Subject: [PATCH] [Python][hpp-fcl] Provide temporary operator== for
 DistanceResult. (#322)

---
 bindings/python/geometry-data.hpp | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/bindings/python/geometry-data.hpp b/bindings/python/geometry-data.hpp
index 3db94b494..00d940ccf 100644
--- a/bindings/python/geometry-data.hpp
+++ b/bindings/python/geometry-data.hpp
@@ -28,6 +28,20 @@
 #include "pinocchio/bindings/python/data.hpp"
 #include "pinocchio/bindings/python/geometry-model.hpp"
 
+namespace fcl
+{
+  // This operator is defined here temporary, as it is needed by vector_indexing_suite
+  // It has also been defined in hpp-fcl in a pending pull request.
+  // Once it has been integrated in releases of hpp-fcl, please remove this operator
+  inline bool operator ==(const DistanceResult & dr1, const DistanceResult& dr2)
+  {
+    return dr1.min_distance == dr2.min_distance
+        && dr1.o1 == dr2.o1
+        && dr1.o2 == dr2.o2
+        && dr1.nearest_points[0] == dr2.nearest_points[0]
+        && dr1.nearest_points[1] == dr2.nearest_points[1];
+  }
+}
 namespace se3
 {
   namespace python
-- 
GitLab