From 1aafea2ab0bc69c9d7d3df47e7b9dc8d181e8cd5 Mon Sep 17 00:00:00 2001
From: Joseph Mirabel <jmirabel@laas.fr>
Date: Fri, 3 Jun 2016 19:17:07 +0200
Subject: [PATCH] Remove sampling

---
 CMakeLists.txt           |  1 -
 src/CMakeLists.txt       |  1 -
 test/test_fcl_simple.cpp | 71 ----------------------------------------
 3 files changed, 73 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 74ca10f7..4cd31fc9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -138,7 +138,6 @@ SET(${PROJECT_NAME}_HEADERS
   include/hpp/fcl/math/matrix_3fx.h
   include/hpp/fcl/math/vec_3f.h
   include/hpp/fcl/math/vec_3fx.h
-  include/hpp/fcl/math/sampling.h
   include/hpp/fcl/math/math_details.h
   include/hpp/fcl/math/transform.h
   include/hpp/fcl/traversal/traversal_node_shapes.h
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index fd57890f..cb15aa25 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -72,7 +72,6 @@ set(${LIBRARY_NAME}_SOURCES
   distance_capsule_capsule.cpp
   intersect.cpp
   math/transform.cpp
-  math/sampling.cpp
   traversal/traversal_node_setup.cpp
   traversal/traversal_node_bvhs.cpp
   traversal/traversal_recurse.cpp
diff --git a/test/test_fcl_simple.cpp b/test/test_fcl_simple.cpp
index e3e57d4f..351f314f 100644
--- a/test/test_fcl_simple.cpp
+++ b/test/test_fcl_simple.cpp
@@ -34,77 +34,6 @@ double distance_Vecnf(const Vecnf<N>& a, const Vecnf<N>& b)
   return d;
 }
 
-BOOST_AUTO_TEST_CASE(knn_test)
-{
-  NearestNeighborsGNAT<Vecnf<6> > knn;
-  knn.setDistanceFunction(distance_Vecnf<6>);
-
-  SamplerSE3Euler sampler(Vec3f(-1, -1, -1), Vec3f(1, 1, 1));
-  std::vector<Vecnf<6> > data;
-  for(std::size_t i = 0; i < 1000; ++i)
-    data.push_back(sampler.sample());
-
-  knn.add(data);
-
-  int K = 10;
-  
-  for(std::size_t i = 0; i < data.size(); ++i)
-  {
-    std::vector<Vecnf<6> > nbh;
-    knn.nearestK(data[i], K, nbh);
-    for(std::size_t j = 0; j < nbh.size(); ++j)
-      std::cout << distance_Vecnf<6>(nbh[j], data[i]) << " ";
-    std::cout << std::endl;
-  }
-}
-
-BOOST_AUTO_TEST_CASE(Vec_nf_test)
-{
-  Vecnf<4> a;
-  Vecnf<4> b;
-  for(std::size_t i = 0; i < a.dim(); ++i)
-    a[i] = i;
-  for(std::size_t i = 0; i < b.dim(); ++i)
-    b[i] = 1;
-
-  std::cout << a << std::endl;
-  std::cout << b << std::endl;
-  std::cout << a + b << std::endl;
-  std::cout << a - b << std::endl;
-  std::cout << (a -= b) << std::endl;
-  std::cout << (a += b) << std::endl;
-  std::cout << a * 2 << std::endl;
-  std::cout << a / 2 << std::endl;
-  std::cout << (a *= 2) << std::endl;
-  std::cout << (a /= 2) << std::endl;
-  std::cout << a.dot(b) << std::endl;
-
-  Vecnf<8> c = combine(a, b);
-  std::cout << c << std::endl;
-
-  Vecnf<4> upper, lower;
-  for(int i = 0; i < 4; ++i)
-    upper[i] = 1;
-
-  Vecnf<4> aa(boost::assign::list_of<FCL_REAL>(1)(2).convert_to_container<std::vector<FCL_REAL> >());
-  std::cout << aa << std::endl;
-
-  SamplerR<4> sampler(lower, upper);
-  for(std::size_t i = 0; i < 10; ++i)
-    std::cout << sampler.sample() << std::endl;
-
-  // Disabled broken test lines. Please see #25.
-  // SamplerSE2 sampler2(0, 1, -1, 1);
-  // for(std::size_t i = 0; i < 10; ++i)
-  //   std::cout << sampler2.sample() << std::endl;
-
-  SamplerSE3Euler sampler3(Vec3f(0, 0, 0), Vec3f(1, 1, 1));
-  for(std::size_t i = 0; i < 10; ++i)
-    std::cout << sampler3.sample() << std::endl;
-  
-}
-
-
 BOOST_AUTO_TEST_CASE(projection_test_line)
 {
   Vec3f v1(0, 0, 0);
-- 
GitLab