38 #ifndef FCL_COLLISION_INL_H
39 #define FCL_COLLISION_INL_H
56 const CollisionRequest<double>& request,
57 CollisionResult<double>& result);
64 const Transform3<double>& tf1,
66 const Transform3<double>& tf2,
67 const CollisionRequest<double>& request,
68 CollisionResult<double>& result);
71 template<
typename GJKSolver>
79 template <
typename S,
typename NarrowPhaseSolver>
84 const NarrowPhaseSolver* nsolver,
89 nsolver, request, result);
93 template <
typename S,
typename NarrowPhaseSolver>
100 const NarrowPhaseSolver* nsolver_,
104 const NarrowPhaseSolver* nsolver = nsolver_;
106 nsolver =
new NarrowPhaseSolver();
108 const auto& looktable = getCollisionFunctionLookTable<NarrowPhaseSolver>();
113 std::cerr <<
"Warning: should stop early as num_max_contact is " << request.
num_max_contacts <<
" !\n";
125 if(!looktable.collision_matrix[node_type2][node_type1])
127 std::cerr <<
"Warning: collision function between node type " << node_type1 <<
" and node type " << node_type2 <<
" is not supported\n";
131 res = looktable.collision_matrix[node_type2][node_type1](o2, tf2, o1, tf1, nsolver, request, result);
135 if(!looktable.collision_matrix[node_type1][node_type2])
137 std::cerr <<
"Warning: collision function between node type " << node_type1 <<
" and node type " << node_type2 <<
" is not supported\n";
141 res = looktable.collision_matrix[node_type1][node_type2](o1, tf1, o2, tf2, nsolver, request, result);
152 template <
typename S>
163 return collide(o1, o2, &solver, request, result);
170 return collide(o1, o2, &solver, request, result);
178 template <
typename S>
194 return collide(o1, tf1, o2, tf2, &solver, request, result);
201 return collide(o1, tf1, o2, tf2, &solver, request, result);
204 std::cerr <<
"Warning! Invalid GJK solver\n";