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)) {
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;