35 #define BOOST_TEST_MODULE FCL_DISTANCE_LOWER_BOUND
36 #include <boost/test/included/unit_test.hpp>
37 #include <boost/filesystem.hpp>
47 #include "fcl_resources/config.h"
58 using hpp::fcl::shared_ptr;
117 std::vector<Vec3f>
p1, p2;
118 std::vector<Triangle> t1, t2;
128 m1->addSubModel(
p1, t1);
132 m2->addSubModel(p2, t2);
135 std::vector<Transform3f> transforms;
142 for (std::size_t i = 0; i < transforms.size(); ++i) {
144 bool col1, col2, col3;
148 std::cout <<
"col1 = " << col1 <<
", col2 = " << col2 <<
", col3 = " << col3
150 std::cout <<
"distance lower bound = " << distanceLowerBound << std::endl;
151 std::cout <<
"distance = " <<
distance << std::endl;
152 BOOST_CHECK(col1 == col3);
154 BOOST_CHECK_MESSAGE(distanceLowerBound <=
distance,
155 "distance = " <<
distance <<
", lower bound = "
156 << distanceLowerBound);
170 std::vector<Transform3f> transforms;
172 const std::size_t n = 1000;
180 BOOST_CHECK(col1 == col2);
181 BOOST_CHECK(distanceLowerBound <=
distance);
183 for (std::size_t i = 0; i < transforms.size(); ++i) {
189 BOOST_CHECK(col1 == col2);
191 BOOST_CHECK_MESSAGE(distanceLowerBound <=
distance,
192 "distance = " <<
distance <<
", lower bound = "
193 << distanceLowerBound);
207 std::vector<Transform3f> transforms;
209 const std::size_t n = 1000;
217 BOOST_CHECK(col1 == col2);
218 BOOST_CHECK(distanceLowerBound <=
distance);
220 for (std::size_t i = 0; i < transforms.size(); ++i) {
226 BOOST_CHECK(col1 == col2);
228 BOOST_CHECK_MESSAGE(distanceLowerBound <=
distance,
229 "distance = " <<
distance <<
", lower bound = "
230 << distanceLowerBound);
236 std::vector<Vec3f>
p1;
237 std::vector<Triangle> t1;
243 shared_ptr<hpp::fcl::Box> m2(
new hpp::fcl::Box(500, 200, 150));
246 m1->addSubModel(
p1, t1);
249 std::vector<Transform3f> transforms;
256 for (std::size_t i = 0; i < transforms.size(); ++i) {
261 BOOST_CHECK(col1 == col2);
263 BOOST_CHECK_MESSAGE(distanceLowerBound <=
distance,
264 "distance = " <<
distance <<
", lower bound = "
265 << distanceLowerBound);