36 #include <gtest/gtest.h>
43 #include "fcl_resources/config.h"
70 return std::abs(x - y) < epsilon<S>();
73 template<
typename S, std::
size_t N>
77 for(std::size_t i = 0; i < N; ++i)
78 d += (a[i] - b[i]) * (a[i] - b[i]);
88 for(
auto i = 0; i < a.size(); ++i)
90 for(
auto i = 0; i < b.size(); ++i)
93 std::cout << a.transpose() << std::endl;
94 std::cout << b.transpose() << std::endl;
95 std::cout << (a + b).transpose() << std::endl;
96 std::cout << (a - b).transpose() << std::endl;
97 std::cout << (a -= b).transpose() << std::endl;
98 std::cout << (a += b).transpose() << std::endl;
99 std::cout << (a * 2).transpose() << std::endl;
100 std::cout << (a / 2).transpose() << std::endl;
101 std::cout << (a *= 2).transpose() << std::endl;
102 std::cout << (a /= 2).transpose() << std::endl;
103 std::cout << a.dot(b) << std::endl;
106 std::cout << c.transpose() << std::endl;
109 for(
int i = 0; i < 4; ++i)
113 std::cout << aa.transpose() << std::endl;
116 for(std::size_t i = 0; i < 10; ++i)
117 std::cout << sampler.
sample().transpose() << std::endl;
125 for(std::size_t i = 0; i < 10; ++i)
126 std::cout << sampler3.
sample().transpose() << std::endl;
133 test_Vec_nf_test<double>();
136 template <
typename S>
168 test_projection_test_line<double>();
171 template <
typename S>
238 test_projection_test_triangle<double>();
241 template <
typename S>
389 test_projection_test_tetrahedron<double>();
393 int main(
int argc,
char* argv[])
395 ::testing::InitGoogleTest(&argc, argv);
396 return RUN_ALL_TESTS();