38 #ifndef HPP_FCL_TRAVERSAL_NODE_SHAPES_H 39 #define HPP_FCL_TRAVERSAL_NODE_SHAPES_H 56 template <
typename S1,
typename S2>
57 class HPP_FCL_DLLAPI ShapeCollisionTraversalNode
58 :
public CollisionTraversalNodeBase {
60 ShapeCollisionTraversalNode(
const CollisionRequest& request)
61 : CollisionTraversalNodeBase(request) {
69 bool BVDisjoints(
int,
int,
FCL_REAL&)
const {
74 void leafCollides(
int,
int,
FCL_REAL&)
const {
76 if (request.enable_contact &&
77 request.num_max_contacts > result->numContacts()) {
78 Vec3f contact_point, normal;
79 if (nsolver->shapeIntersect(*model1,
tf1, *model2,
tf2, distance,
true,
80 &contact_point, &normal)) {
82 contact_point, normal, distance));
85 bool res = nsolver->shapeIntersect(*model1,
tf1, *model2,
tf2, distance,
86 request.enable_distance_lower_bound,
88 if (request.enable_distance_lower_bound)
89 result->updateDistanceLowerBound(distance);
91 if (request.num_max_contacts > result->numContacts())
101 const GJKSolver* nsolver;
110 template <
typename S1,
typename S2>
111 class HPP_FCL_DLLAPI ShapeDistanceTraversalNode
112 :
public DistanceTraversalNodeBase {
114 ShapeDistanceTraversalNode() : DistanceTraversalNodeBase() {
122 FCL_REAL BVDistanceLowerBound(
unsigned int,
unsigned int)
const {
127 void leafComputeDistance(
unsigned int,
unsigned int)
const {
129 Vec3f closest_p1, closest_p2, normal;
130 nsolver->shapeDistance(*model1,
tf1, *model2,
tf2, distance, closest_p1,
139 const GJKSolver* nsolver;
HPP_FCL_DLLAPI FCL_REAL distance(const Matrix3f &R0, const Vec3f &T0, const kIOS &b1, const kIOS &b2, Vec3f *P=NULL, Vec3f *Q=NULL)
Approximate distance between two kIOS bounding volumes.
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
#define HPP_FCL_THROW_PRETTY(message, exception)
static const int NONE
invalid contact primitive information