From be967892b3948dfb1425e6cfb7de65f525cd3e70 Mon Sep 17 00:00:00 2001
From: Lucile Remigy <lucile.remigy@epitech.eu>
Date: Wed, 25 Sep 2019 15:02:05 +0200
Subject: [PATCH] delete ShapeNeshCollisionTraversalNode, 0 tests failed

---
 src/traversal/traversal_node_setup.h | 92 ----------------------------
 test/box_box_distance.cpp            |  1 +
 test/capsule_capsule.cpp             |  1 +
 test/utility.cpp                     |  1 +
 4 files changed, 3 insertions(+), 92 deletions(-)

diff --git a/src/traversal/traversal_node_setup.h b/src/traversal/traversal_node_setup.h
index db656f5c..d6d447fe 100644
--- a/src/traversal/traversal_node_setup.h
+++ b/src/traversal/traversal_node_setup.h
@@ -342,52 +342,6 @@ bool initialize(MeshShapeCollisionTraversalNode<BV, S, GJKSolver>& node,
   return true;
 }
 
-
-/// @brief Initialize traversal node for collision between one mesh and one shape, given current object transform
-template<typename S, typename BV, typename GJKSolver>
-bool initialize(ShapeMeshCollisionTraversalNode<S, BV, GJKSolver>& node,
-                const S& model1, const Transform3f& tf1,
-                BVHModel<BV>& model2, Transform3f& tf2,
-                const GJKSolver* nsolver,
-                CollisionResult& result,
-                bool use_refit = false, bool refit_bottomup = false)
-{
-  if(model2.getModelType() != BVH_MODEL_TRIANGLES)
-    return false;
-
-  if(!tf2.isIdentity())
-  {
-    std::vector<Vec3f> vertices_transformed(model2.num_vertices);
-    for(int i = 0; i < model2.num_vertices; ++i)
-    {
-      Vec3f& p = model2.vertices[i];
-      Vec3f new_v = tf2.transform(p);
-      vertices_transformed[i] = new_v;
-    }
-
-    model2.beginReplaceModel();
-    model2.replaceSubModel(vertices_transformed);
-    model2.endReplaceModel(use_refit, refit_bottomup);
-
-    tf2.setIdentity();
-  }
-
-  node.model1 = &model1;
-  node.tf1 = tf1;
-  node.model2 = &model2;
-  node.tf2 = tf2;
-  node.nsolver = nsolver;
-
-  computeBV(model1, tf1, node.model1_bv);
-
-  node.vertices = model2.vertices;
-  node.tri_indices = model2.tri_indices;
-
-  node.result = &result;
-
-  return true;
-}
-
 /// @cond IGNORE
 namespace details
 {
@@ -499,52 +453,6 @@ static inline bool setupShapeMeshCollisionOrientedNode(OrientedNode<S, GJKSolver
 }
 /// @endcond
 
-/// @brief Initialize the traversal node for collision between one mesh and one shape, specialized for OBB type
-template<typename S, typename GJKSolver>
-bool initialize(ShapeMeshCollisionTraversalNodeOBB<S, GJKSolver>& node,
-                const S& model1, const Transform3f& tf1,
-                const BVHModel<OBB>& model2, const Transform3f& tf2,
-                const GJKSolver* nsolver,
-                CollisionResult& result)
-{
-  return details::setupShapeMeshCollisionOrientedNode(node, model1, tf1, model2, tf2, nsolver, result);
-}
-
-/// @brief Initialize the traversal node for collision between one mesh and one shape, specialized for RSS type
-template<typename S, typename GJKSolver>
-bool initialize(ShapeMeshCollisionTraversalNodeRSS<S, GJKSolver>& node,
-                const S& model1, const Transform3f& tf1,
-                const BVHModel<RSS>& model2, const Transform3f& tf2,
-                const GJKSolver* nsolver,
-                CollisionResult& result)
-{
-  return details::setupShapeMeshCollisionOrientedNode(node, model1, tf1, model2, tf2, nsolver, result);
-}
-
-/// @brief Initialize the traversal node for collision between one mesh and one shape, specialized for kIOS type
-template<typename S, typename GJKSolver>
-bool initialize(ShapeMeshCollisionTraversalNodekIOS<S, GJKSolver>& node,
-                const S& model1, const Transform3f& tf1,
-                const BVHModel<kIOS>& model2, const Transform3f& tf2,
-                const GJKSolver* nsolver,
-                CollisionResult& result)
-{
-  return details::setupShapeMeshCollisionOrientedNode(node, model1, tf1, model2, tf2, nsolver, result);
-}
-
-/// @brief Initialize the traversal node for collision between one mesh and one shape, specialized for OBBRSS type
-template<typename S, typename GJKSolver>
-bool initialize(ShapeMeshCollisionTraversalNodeOBBRSS<S, GJKSolver>& node,
-                const S& model1, const Transform3f& tf1,
-                const BVHModel<OBBRSS>& model2, const Transform3f& tf2,
-                const GJKSolver* nsolver,
-                CollisionResult& result)
-{
-  return details::setupShapeMeshCollisionOrientedNode(node, model1, tf1, model2, tf2, nsolver, result);
-}
-
-
-
 
 /// @brief Initialize traversal node for collision between two meshes, given the current transforms
 template<typename BV>
diff --git a/test/box_box_distance.cpp b/test/box_box_distance.cpp
index df295a9f..90d090e3 100644
--- a/test/box_box_distance.cpp
+++ b/test/box_box_distance.cpp
@@ -42,6 +42,7 @@
 #define CHECK_CLOSE_TO_0(x, eps) BOOST_CHECK_CLOSE ((x + 1.0), (1.0), (eps))
 
 #include <cmath>
+#include <iostream>
 #include <hpp/fcl/distance.h>
 #include <hpp/fcl/math/transform.h>
 #include <hpp/fcl/collision.h>
diff --git a/test/capsule_capsule.cpp b/test/capsule_capsule.cpp
index ee2a063a..7dda5376 100644
--- a/test/capsule_capsule.cpp
+++ b/test/capsule_capsule.cpp
@@ -43,6 +43,7 @@
 #define CHECK_CLOSE_TO_0(x, eps) BOOST_CHECK_CLOSE ((x + 1.0), (1.0), (eps))
 
 #include <cmath>
+#include <iostream>
 #include <hpp/fcl/distance.h>
 #include <hpp/fcl/math/transform.h>
 #include <hpp/fcl/collision.h>
diff --git a/test/utility.cpp b/test/utility.cpp
index f5708d94..005caaf1 100644
--- a/test/utility.cpp
+++ b/test/utility.cpp
@@ -4,6 +4,7 @@
 #include <cstdio>
 #include <cstddef>
 #include <fstream>
+#include <iostream>
 
 namespace hpp
 {
-- 
GitLab