#include <boost/test/included/unit_test.hpp>
#include <hpp/fcl/narrowphase/narrowphase.h>
#include <hpp/fcl/collision.h>
#include <hpp/fcl/distance.h>
#include "utility.h"
#include <iostream>
#include <hpp/fcl/internal/tools.h>
#include <hpp/fcl/shape/geometric_shape_to_BVH_model.h>
Go to the source code of this file.
Namespaces | |
hpp | |
Main namespace. | |
hpp::fcl | |
Macros | |
#define | BOOST_CHECK_FALSE(p) BOOST_CHECK(!(p)) |
#define | BOOST_TEST_MODULE FCL_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 (sphere_to_bvh) | |
BOOST_AUTO_TEST_CASE (cylinder_to_bvh) | |
BOOST_AUTO_TEST_CASE (cone_to_bvh) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_cylinderbox) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_spheresphere) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_boxbox) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_spherebox) | |
BOOST_AUTO_TEST_CASE (shapeDistance_spherebox) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_spherecapsule) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_cylindercylinder) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_spheretriangle) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_halfspacetriangle) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_planetriangle) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_halfspacesphere) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_planesphere) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_halfspacebox) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_planebox) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_halfspacecapsule) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_planecapsule) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_halfspacecylinder) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_planecylinder) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_halfspacecone) | |
BOOST_AUTO_TEST_CASE (shapeIntersection_planecone) | |
BOOST_AUTO_TEST_CASE (shapeDistance_spheresphere) | |
BOOST_AUTO_TEST_CASE (shapeDistance_boxbox) | |
BOOST_AUTO_TEST_CASE (shapeDistance_boxsphere) | |
BOOST_AUTO_TEST_CASE (shapeDistance_cylindercylinder) | |
BOOST_AUTO_TEST_CASE (shapeDistance_conecone) | |
BOOST_AUTO_TEST_CASE (shapeDistance_conecylinder) | |
BOOST_AUTO_TEST_CASE (shapeIntersectionGJK_spheresphere) | |
BOOST_AUTO_TEST_CASE (shapeIntersectionGJK_boxbox) | |
BOOST_AUTO_TEST_CASE (shapeIntersectionGJK_spherebox) | |
BOOST_AUTO_TEST_CASE (shapeIntersectionGJK_spherecapsule) | |
BOOST_AUTO_TEST_CASE (shapeIntersectionGJK_cylindercylinder) | |
BOOST_AUTO_TEST_CASE (shapeIntersectionGJK_conecone) | |
BOOST_AUTO_TEST_CASE (shapeIntersectionGJK_conecylinder) | |
BOOST_AUTO_TEST_CASE (shapeIntersectionGJK_spheretriangle) | |
BOOST_AUTO_TEST_CASE (shapeIntersectionGJK_halfspacetriangle) | |
BOOST_AUTO_TEST_CASE (shapeIntersectionGJK_planetriangle) | |
BOOST_AUTO_TEST_CASE (spheresphere) | |
BOOST_AUTO_TEST_CASE (boxbox) | |
BOOST_AUTO_TEST_CASE (boxsphere) | |
BOOST_AUTO_TEST_CASE (cylindercylinder) | |
BOOST_AUTO_TEST_CASE (conecone) | |
BOOST_AUTO_TEST_CASE (reversibleShapeDistance_allshapes) | |
template<typename S1 , typename S2 > | |
void | compareContact (const S1 &s1, const Transform3f &tf1, const S2 &s2, const Transform3f &tf2, const Vec3f &contact, Vec3f *expected_point, FCL_REAL depth, FCL_REAL *expected_depth, const Vec3f &normal, Vec3f *expected_normal, bool check_opposite_normal, FCL_REAL tol) |
bool | compareContactPoints (const Vec3f &c1, const Vec3f &c2) |
std::ostream & | hpp::fcl::operator<< (std::ostream &os, const ShapeBase &) |
std::ostream & | hpp::fcl::operator<< (std::ostream &os, const Box &b) |
template<typename S1 , typename S2 > | |
void | printComparisonError (const std::string &comparison_type, const S1 &s1, const Transform3f &tf1, const S2 &s2, const Transform3f &tf2, const Vec3f &contact_or_normal, const Vec3f &expected_contact_or_normal, bool check_opposite_normal, FCL_REAL tol) |
template<typename S1 , typename S2 > | |
void | printComparisonError (const std::string &comparison_type, const S1 &s1, const Transform3f &tf1, const S2 &s2, const Transform3f &tf2, FCL_REAL depth, FCL_REAL expected_depth, FCL_REAL tol) |
void | testBoxBoxContactPoints (const Matrix3f &R) |
template<typename S1 , typename S2 > | |
void | testReversibleShapeDistance (const S1 &s1, const S2 &s2, FCL_REAL distance) |
template<typename S1 , typename S2 > | |
void | testShapeIntersection (const S1 &s1, const Transform3f &tf1, const S2 &s2, const Transform3f &tf2, bool expect_collision, Vec3f *expected_point=NULL, FCL_REAL *expected_depth=NULL, Vec3f *expected_normal=NULL, bool check_opposite_normal=false, FCL_REAL tol=1e-9) |
Variables | |
FCL_REAL | extents [6] = {0, 0, 0, 10, 10, 10} |
int | line |
GJKSolver | solver1 |
GJKSolver | solver2 |
FCL_REAL | tol_gjk = 0.01 |
#define BOOST_CHECK_FALSE | ( | p | ) | BOOST_CHECK(!(p)) |
Definition at line 65 of file test/geometric_shapes.cpp.
#define BOOST_TEST_MODULE FCL_GEOMETRIC_SHAPES |
Definition at line 38 of file test/geometric_shapes.cpp.
#define FCL_CHECK | ( | cond | ) | BOOST_CHECK_MESSAGE(cond, "from line " << line << ": " #cond) |
Definition at line 59 of file test/geometric_shapes.cpp.
#define FCL_CHECK_EQUAL | ( | a, | |
b | |||
) |
Definition at line 61 of file test/geometric_shapes.cpp.
#define SET_LINE line = __LINE__ |
Definition at line 58 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 | ( | sphere_to_bvh | ) |
Definition at line 216 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 | ( | cone_to_bvh | ) |
Definition at line 230 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_cylinderbox | ) |
Definition at line 237 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_spheresphere | ) |
Definition at line 293 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_boxbox | ) |
Definition at line 439 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_spherebox | ) |
Definition at line 505 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeDistance_spherebox | ) |
Definition at line 559 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_spherecapsule | ) |
Definition at line 582 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_cylindercylinder | ) |
Definition at line 647 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_spheretriangle | ) |
Definition at line 835 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_halfspacetriangle | ) |
Definition at line 882 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_planetriangle | ) |
Definition at line 938 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_halfspacesphere | ) |
Definition at line 982 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_planesphere | ) |
Definition at line 1071 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_halfspacebox | ) |
Definition at line 1154 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_planebox | ) |
Definition at line 1248 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_halfspacecapsule | ) |
Definition at line 1336 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_planecapsule | ) |
Definition at line 1577 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_halfspacecylinder | ) |
Definition at line 1800 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_planecylinder | ) |
Definition at line 2041 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_halfspacecone | ) |
Definition at line 2264 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersection_planecone | ) |
Definition at line 2505 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeDistance_spheresphere | ) |
Definition at line 2729 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeDistance_boxbox | ) |
Definition at line 2812 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeDistance_boxsphere | ) |
Definition at line 2900 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeDistance_cylindercylinder | ) |
Definition at line 2964 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeDistance_conecone | ) |
Definition at line 3010 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeDistance_conecylinder | ) |
Definition at line 3056 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersectionGJK_spheresphere | ) |
Definition at line 3102 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersectionGJK_boxbox | ) |
Definition at line 3199 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersectionGJK_spherebox | ) |
Definition at line 3257 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersectionGJK_spherecapsule | ) |
Definition at line 3315 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersectionGJK_cylindercylinder | ) |
Definition at line 3368 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersectionGJK_conecone | ) |
Definition at line 3425 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersectionGJK_conecylinder | ) |
Definition at line 3494 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersectionGJK_spheretriangle | ) |
Definition at line 3569 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersectionGJK_halfspacetriangle | ) |
Definition at line 3617 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | shapeIntersectionGJK_planetriangle | ) |
Definition at line 3665 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | spheresphere | ) |
Definition at line 3713 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | boxbox | ) |
Definition at line 3796 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | boxsphere | ) |
Definition at line 3842 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | cylindercylinder | ) |
Definition at line 3888 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | conecone | ) |
Definition at line 3934 of file test/geometric_shapes.cpp.
BOOST_AUTO_TEST_CASE | ( | reversibleShapeDistance_allshapes | ) |
Definition at line 4019 of file test/geometric_shapes.cpp.
void compareContact | ( | const S1 & | s1, |
const Transform3f & | tf1, | ||
const S2 & | s2, | ||
const Transform3f & | tf2, | ||
const Vec3f & | contact, | ||
Vec3f * | expected_point, | ||
FCL_REAL | depth, | ||
FCL_REAL * | expected_depth, | ||
const Vec3f & | normal, | ||
Vec3f * | expected_normal, | ||
bool | check_opposite_normal, | ||
FCL_REAL | tol | ||
) |
Definition at line 129 of file test/geometric_shapes.cpp.
Definition at line 390 of file test/geometric_shapes.cpp.
void printComparisonError | ( | const std::string & | comparison_type, |
const S1 & | s1, | ||
const Transform3f & | tf1, | ||
const S2 & | s2, | ||
const Transform3f & | tf2, | ||
const Vec3f & | contact_or_normal, | ||
const Vec3f & | expected_contact_or_normal, | ||
bool | check_opposite_normal, | ||
FCL_REAL | tol | ||
) |
Definition at line 80 of file test/geometric_shapes.cpp.
void printComparisonError | ( | const std::string & | comparison_type, |
const S1 & | s1, | ||
const Transform3f & | tf1, | ||
const S2 & | s2, | ||
const Transform3f & | tf2, | ||
FCL_REAL | depth, | ||
FCL_REAL | expected_depth, | ||
FCL_REAL | tol | ||
) |
Definition at line 111 of file test/geometric_shapes.cpp.
void testBoxBoxContactPoints | ( | const Matrix3f & | R | ) |
Definition at line 394 of file test/geometric_shapes.cpp.
void testReversibleShapeDistance | ( | const S1 & | s1, |
const S2 & | s2, | ||
FCL_REAL | distance | ||
) |
Definition at line 3981 of file test/geometric_shapes.cpp.
void testShapeIntersection | ( | const S1 & | s1, |
const Transform3f & | tf1, | ||
const S2 & | s2, | ||
const Transform3f & | tf2, | ||
bool | expect_collision, | ||
Vec3f * | expected_point = NULL , |
||
FCL_REAL * | expected_depth = NULL , |
||
Vec3f * | expected_normal = NULL , |
||
bool | check_opposite_normal = false , |
||
FCL_REAL | tol = 1e-9 |
||
) |
Definition at line 165 of file test/geometric_shapes.cpp.
FCL_REAL extents[6] = {0, 0, 0, 10, 10, 10} |
Definition at line 51 of file test/geometric_shapes.cpp.
int line |
Definition at line 57 of file test/geometric_shapes.cpp.
GJKSolver solver1 |
Definition at line 54 of file test/geometric_shapes.cpp.
GJKSolver solver2 |
Definition at line 55 of file test/geometric_shapes.cpp.
FCL_REAL tol_gjk = 0.01 |
Definition at line 53 of file test/geometric_shapes.cpp.