#include <boost/test/included/unit_test.hpp>#include "coal/narrowphase/narrowphase.h"#include "coal/collision.h"#include "coal/distance.h"#include "utility.h"#include <iostream>#include "coal/internal/tools.h"#include "coal/shape/geometric_shape_to_BVH_model.h"#include "coal/internal/shape_shape_func.h"
Go to the source code of this file.
| Namespaces | |
| coal | |
| Main namespace. | |
| Macros | |
| #define | BOOST_CHECK_FALSE(p) BOOST_CHECK(!(p)) | 
| #define | BOOST_TEST_MODULE COAL_GEOMETRIC_SHAPES | 
| #define | FCL_CHECK(cond) BOOST_CHECK_MESSAGE(cond, "from line " << line << ": " #cond) | 
| #define | FCL_CHECK_EQUAL(a, b) | 
| #define | SET_LINE line = __LINE__ | 
| Functions | |
| BOOST_AUTO_TEST_CASE (box_to_bvh) | |
| BOOST_AUTO_TEST_CASE (collide_boxbox) | |
| BOOST_AUTO_TEST_CASE (collide_conecone) | |
| BOOST_AUTO_TEST_CASE (collide_conecylinder) | |
| BOOST_AUTO_TEST_CASE (collide_cylindercylinder) | |
| BOOST_AUTO_TEST_CASE (collide_halfspacebox) | |
| BOOST_AUTO_TEST_CASE (collide_halfspacecapsule) | |
| BOOST_AUTO_TEST_CASE (collide_halfspacecone) | |
| BOOST_AUTO_TEST_CASE (collide_halfspacecylinder) | |
| BOOST_AUTO_TEST_CASE (collide_halfspacehalfspace) | |
| BOOST_AUTO_TEST_CASE (collide_halfspaceplane) | |
| BOOST_AUTO_TEST_CASE (collide_halfspacesphere) | |
| BOOST_AUTO_TEST_CASE (collide_halfspacetriangle) | |
| BOOST_AUTO_TEST_CASE (collide_planebox) | |
| BOOST_AUTO_TEST_CASE (collide_planecapsule) | |
| BOOST_AUTO_TEST_CASE (collide_planecone) | |
| BOOST_AUTO_TEST_CASE (collide_planecylinder) | |
| BOOST_AUTO_TEST_CASE (collide_planeplane) | |
| BOOST_AUTO_TEST_CASE (collide_planesphere) | |
| BOOST_AUTO_TEST_CASE (collide_planetriangle) | |
| BOOST_AUTO_TEST_CASE (collide_spherebox) | |
| BOOST_AUTO_TEST_CASE (collide_spherecapsule) | |
| BOOST_AUTO_TEST_CASE (collide_spheresphere) | |
| BOOST_AUTO_TEST_CASE (collide_spheretriangle) | |
| BOOST_AUTO_TEST_CASE (cone_to_bvh) | |
| BOOST_AUTO_TEST_CASE (cylinder_to_bvh) | |
| BOOST_AUTO_TEST_CASE (distance_spherebox) | |
| BOOST_AUTO_TEST_CASE (GJKSolver_shapeDistance_boxbox) | |
| BOOST_AUTO_TEST_CASE (GJKSolver_shapeDistance_boxsphere) | |
| BOOST_AUTO_TEST_CASE (GJKSolver_shapeDistance_conecone) | |
| BOOST_AUTO_TEST_CASE (GJKSolver_shapeDistance_conecylinder) | |
| BOOST_AUTO_TEST_CASE (GJKSolver_shapeDistance_cylinderbox) | |
| BOOST_AUTO_TEST_CASE (GJKSolver_shapeDistance_cylindercylinder) | |
| BOOST_AUTO_TEST_CASE (GJKSolver_shapeDistance_spheresphere) | |
| BOOST_AUTO_TEST_CASE (reversibleShapeDistance_allshapes) | |
| BOOST_AUTO_TEST_CASE (sphere_to_bvh) | |
| template<typename S1 , typename S2 > | |
| void | compareContact (const S1 &s1, const Transform3s &tf1, const S2 &s2, const Transform3s &tf2, const Vec3s &contact, Vec3s *expected_point, CoalScalar depth, CoalScalar *expected_depth, const Vec3s &normal, Vec3s *expected_normal, bool check_opposite_normal, CoalScalar tol) | 
| bool | compareContactPoints (const Vec3s &c1, const Vec3s &c2) | 
| std::ostream & | coal::operator<< (std::ostream &os, const Box &b) | 
| std::ostream & | coal::operator<< (std::ostream &os, const ShapeBase &) | 
| template<typename S1 , typename S2 > | |
| void | printComparisonError (const std::string &comparison_type, const S1 &s1, const Transform3s &tf1, const S2 &s2, const Transform3s &tf2, CoalScalar depth, CoalScalar expected_depth, CoalScalar tol) | 
| template<typename S1 , typename S2 > | |
| void | printComparisonError (const std::string &comparison_type, const S1 &s1, const Transform3s &tf1, const S2 &s2, const Transform3s &tf2, const Vec3s &contact_or_normal, const Vec3s &expected_contact_or_normal, bool check_opposite_normal, CoalScalar tol) | 
| void | testBoxBoxContactPoints (const Matrix3s &R) | 
| template<typename S1 , typename S2 > | |
| void | testReversibleShapeDistance (const S1 &s1, const S2 &s2, CoalScalar distance) | 
| template<typename S1 , typename S2 > | |
| void | testShapeCollide (const S1 &s1, const Transform3s &tf1, const S2 &s2, const Transform3s &tf2, bool expect_collision, Vec3s *expected_point=NULL, CoalScalar *expected_depth=NULL, Vec3s *expected_normal=NULL, bool check_opposite_normal=false, CoalScalar tol=1e-9) | 
| Variables | |
| CoalScalar | extents [6] = {0, 0, 0, 10, 10, 10} | 
| int | line | 
| GJKSolver | solver1 | 
| GJKSolver | solver2 | 
| CoalScalar | tol_gjk = 0.01 | 
| #define BOOST_CHECK_FALSE | ( | p | ) | BOOST_CHECK(!(p)) | 
Definition at line 67 of file test/geometric_shapes.cpp.
| #define BOOST_TEST_MODULE COAL_GEOMETRIC_SHAPES | 
Definition at line 39 of file test/geometric_shapes.cpp.
| #define FCL_CHECK | ( | cond | ) | BOOST_CHECK_MESSAGE(cond, "from line " << line << ": " #cond) | 
Definition at line 61 of file test/geometric_shapes.cpp.
| #define FCL_CHECK_EQUAL | ( | a, | |
| b | |||
| ) | 
| #define SET_LINE line = __LINE__ | 
Definition at line 60 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | box_to_bvh | ) | 
Definition at line 210 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_boxbox | ) | 
Definition at line 384 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_conecone | ) | 
Definition at line 657 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_conecylinder | ) | 
Definition at line 735 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_cylindercylinder | ) | 
Definition at line 594 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_halfspacebox | ) | 
Definition at line 1472 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_halfspacecapsule | ) | 
Definition at line 1659 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_halfspacecone | ) | 
Definition at line 2668 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_halfspacecylinder | ) | 
Definition at line 2123 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_halfspacehalfspace | ) | 
Definition at line 3333 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_halfspaceplane | ) | 
Definition at line 3449 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_halfspacesphere | ) | 
Definition at line 1274 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_halfspacetriangle | ) | 
Definition at line 1031 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_planebox | ) | 
Definition at line 1566 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_planecapsule | ) | 
Definition at line 1900 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_planecone | ) | 
Definition at line 2909 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_planecylinder | ) | 
Definition at line 2364 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_planeplane | ) | 
Definition at line 3213 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_planesphere | ) | 
Definition at line 1363 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_planetriangle | ) | 
Definition at line 1150 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_spherebox | ) | 
Definition at line 454 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_spherecapsule | ) | 
Definition at line 529 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_spheresphere | ) | 
Definition at line 237 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | collide_spheretriangle | ) | 
Definition at line 843 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | cone_to_bvh | ) | 
Definition at line 230 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | cylinder_to_bvh | ) | 
Definition at line 223 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | distance_spherebox | ) | 
Definition at line 506 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | GJKSolver_shapeDistance_boxbox | ) | 
Definition at line 3639 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | GJKSolver_shapeDistance_boxsphere | ) | 
Definition at line 3768 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | GJKSolver_shapeDistance_conecone | ) | 
Definition at line 3897 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | GJKSolver_shapeDistance_conecylinder | ) | 
Definition at line 3965 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | GJKSolver_shapeDistance_cylinderbox | ) | 
Definition at line 3716 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | GJKSolver_shapeDistance_cylindercylinder | ) | 
Definition at line 3829 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | GJKSolver_shapeDistance_spheresphere | ) | 
Definition at line 3567 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | reversibleShapeDistance_allshapes | ) | 
Definition at line 4074 of file test/geometric_shapes.cpp.
| BOOST_AUTO_TEST_CASE | ( | sphere_to_bvh | ) | 
Definition at line 216 of file test/geometric_shapes.cpp.
| void compareContact | ( | const S1 & | s1, | 
| const Transform3s & | tf1, | ||
| const S2 & | s2, | ||
| const Transform3s & | tf2, | ||
| const Vec3s & | contact, | ||
| Vec3s * | expected_point, | ||
| CoalScalar | depth, | ||
| CoalScalar * | expected_depth, | ||
| const Vec3s & | normal, | ||
| Vec3s * | expected_normal, | ||
| bool | check_opposite_normal, | ||
| CoalScalar | tol | ||
| ) | 
Definition at line 129 of file test/geometric_shapes.cpp.
Definition at line 334 of file test/geometric_shapes.cpp.
| void printComparisonError | ( | const std::string & | comparison_type, | 
| const S1 & | s1, | ||
| const Transform3s & | tf1, | ||
| const S2 & | s2, | ||
| const Transform3s & | tf2, | ||
| CoalScalar | depth, | ||
| CoalScalar | expected_depth, | ||
| CoalScalar | tol | ||
| ) | 
Definition at line 111 of file test/geometric_shapes.cpp.
| void printComparisonError | ( | const std::string & | comparison_type, | 
| const S1 & | s1, | ||
| const Transform3s & | tf1, | ||
| const S2 & | s2, | ||
| const Transform3s & | tf2, | ||
| const Vec3s & | contact_or_normal, | ||
| const Vec3s & | expected_contact_or_normal, | ||
| bool | check_opposite_normal, | ||
| CoalScalar | tol | ||
| ) | 
Definition at line 80 of file test/geometric_shapes.cpp.
| void testBoxBoxContactPoints | ( | const Matrix3s & | R | ) | 
Definition at line 338 of file test/geometric_shapes.cpp.
| void testReversibleShapeDistance | ( | const S1 & | s1, | 
| const S2 & | s2, | ||
| CoalScalar | distance | ||
| ) | 
Definition at line 4034 of file test/geometric_shapes.cpp.
| void testShapeCollide | ( | const S1 & | s1, | 
| const Transform3s & | tf1, | ||
| const S2 & | s2, | ||
| const Transform3s & | tf2, | ||
| bool | expect_collision, | ||
| Vec3s * | expected_point = NULL, | ||
| CoalScalar * | expected_depth = NULL, | ||
| Vec3s * | expected_normal = NULL, | ||
| bool | check_opposite_normal = false, | ||
| CoalScalar | tol = 1e-9 | ||
| ) | 
Definition at line 165 of file test/geometric_shapes.cpp.
| CoalScalar extents[6] = {0, 0, 0, 10, 10, 10} | 
Definition at line 53 of file test/geometric_shapes.cpp.
| int line | 
Definition at line 59 of file test/geometric_shapes.cpp.
| GJKSolver solver1 | 
Definition at line 56 of file test/geometric_shapes.cpp.
| GJKSolver solver2 | 
Definition at line 57 of file test/geometric_shapes.cpp.
| CoalScalar tol_gjk = 0.01 | 
Definition at line 55 of file test/geometric_shapes.cpp.