35 #define BOOST_TEST_MODULE COAL_SECURITY_MARGIN
36 #include <boost/test/included/unit_test.hpp>
60 #define MATH_SQUARED(x) (x * x)
70 const double tol = 1e-8;
80 computeBV(s2, tf2_collision, bv2_transformed);
83 bv1.
overlap(bv2_transformed, collisionRequest, sqrDistLowerBound);
85 BOOST_CHECK_CLOSE(sqrDistLowerBound, 0, tol);
95 computeBV(s2, tf2_no_collision, bv2_transformed);
98 bv1.
overlap(bv2_transformed, collisionRequest, sqrDistLowerBound);
110 AABB bv2_transformed;
111 computeBV(s2, tf2_no_collision, bv2_transformed);
114 bv1.
overlap(bv2_transformed, collisionRequest, sqrDistLowerBound);
116 BOOST_CHECK_SMALL(sqrDistLowerBound, tol);
126 AABB bv2_transformed;
130 bv1.
overlap(bv2_transformed, collisionRequest, sqrDistLowerBound);
132 BOOST_CHECK_SMALL(sqrDistLowerBound, tol);
140 AABB bv2_transformed;
141 computeBV(s2, tf2_collision, bv2_transformed);
144 bv1.
overlap(bv2_transformed, collisionRequest, sqrDistLowerBound);
170 AABB bv2_transformed;
171 computeBV(s2, tf2_collision, bv2_transformed);
174 bv1.
overlap(bv2_transformed, collisionRequest, sqrDistLowerBound);
179 BOOST_CHECK(!bv1.
overlap(bv3));
197 collide(s1.get(),
tf1, s2.get(), tf2_collision, collisionRequest,
211 collide(s1.get(),
tf1, s2.get(), tf2_no_collision, collisionRequest,
225 collide(s1.get(),
tf1, s2.get(),
tf2, collisionRequest, collisionResult);
240 collide(s1.get(),
tf1, s2.get(),
tf2, collisionRequest, collisionResult);
252 collide(s1.get(),
tf1, s2.get(), tf2_collision, collisionRequest,
271 collide(c1.get(),
tf1,
c2.get(), tf2_collision, collisionRequest,
285 collide(c1.get(),
tf1,
c2.get(), tf2_no_collision, collisionRequest,
299 collide(c1.get(),
tf1,
c2.get(), tf2_no_collision, collisionRequest,
315 collide(c1.get(),
tf1,
c2.get(),
tf2, collisionRequest, collisionResult);
327 collide(c1.get(),
tf1,
c2.get(), tf2_collision, collisionRequest,
341 const double tol = 1e-3;
347 collide(b1.get(),
tf1, b2.get(), tf2_collision, collisionRequest,
362 collide(b1.get(),
tf1, b2.get(), tf2_no_collision, collisionRequest,
374 collide(b1.get(),
tf1, b2.get(), tf2_collision, collisionRequest,
387 collide(b1.get(),
tf1, b2.get(), tf2_collision, collisionRequest,
405 collide(b1.get(),
tf1, b2.get(),
tf2, collisionRequest, collisionResult);
413 template <
typename ShapeType1,
typename ShapeType2>
415 const ShapeType2& shape2,
421 collide(&shape1,
tf1, &shape2, tf2_collision, collisionRequest,
436 collide(&shape1,
tf1, &shape2, tf2_no_collision, collisionRequest,
448 collide(&shape1,
tf1, &shape2, tf2_collision, collisionRequest,
461 collide(&shape1,
tf1, &shape2, tf2_collision, collisionRequest,
482 collide(&shape1,
tf1, &shape2,
tf2, collisionRequest, collisionResult);
502 const double tol = 1e-6;