Skip to content
Snippets Groups Projects
Commit 1aafea2a authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Remove sampling

parent 762d643b
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment