38 #ifndef HPP_FCL_TRAVERSAL_NODE_SHAPES_H 39 #define HPP_FCL_TRAVERSAL_NODE_SHAPES_H 58 template<
typename S1,
typename S2>
59 class ShapeCollisionTraversalNode :
public CollisionTraversalNodeBase
62 ShapeCollisionTraversalNode(
const CollisionRequest& request) :
63 CollisionTraversalNodeBase(request)
72 bool BVDisjoints(
int,
int)
const 78 bool BVDisjoints(
int,
int,
FCL_REAL&)
const 80 throw std::runtime_error (
"Not implemented");
84 void leafCollides(
int,
int,
FCL_REAL&)
const 86 bool is_collision =
false;
88 if(request.enable_contact && request.num_max_contacts > result->numContacts())
90 Vec3f contact_point, normal;
91 if(nsolver->shapeIntersect(*model1, tf1, *model2, tf2, distance,
true,
92 &contact_point, &normal))
102 bool res = nsolver->shapeIntersect(*model1, tf1, *model2, tf2, distance,
103 request.enable_distance_lower_bound, NULL, NULL);
104 if (request.enable_distance_lower_bound)
105 result->updateDistanceLowerBound (distance);
109 if(request.num_max_contacts > result->numContacts())
119 const GJKSolver* nsolver;
128 template<
typename S1,
typename S2>
129 class ShapeDistanceTraversalNode :
public DistanceTraversalNodeBase
132 ShapeDistanceTraversalNode() : DistanceTraversalNodeBase()
141 FCL_REAL BVDistanceLowerBound(
int,
int)
const 147 void leafComputeDistance(
int,
int)
const 150 Vec3f closest_p1, closest_p2, normal;
151 nsolver->shapeDistance(*model1, tf1, *model2, tf2, distance, closest_p1,
160 const GJKSolver* nsolver;
Main namespace.
Definition: AABB.h:43
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.
double FCL_REAL
Definition: data_types.h:68
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
Definition: data_types.h:73
static const int NONE
invalid contact primitive information
Definition: collision_data.h:366