37 #ifndef FCL_BROADPHASE_DEFAULTBROADPHASECALLBACKS_H 38 #define FCL_BROADPHASE_DEFAULTBROADPHASECALLBACKS_H 90 assert(data !=
nullptr);
95 if(collision_data->done)
return true;
97 collide(o1, o2, request, result);
100 result.
numContacts() >= request.num_max_contacts) {
101 collision_data->done =
true;
104 return collision_data->done;
112 template <
typename S>
144 template <
typename S>
148 assert(data !=
nullptr);
151 if (cdata->done)
return true;
155 collide(o1, o2, request, result);
164 template <
typename S>
195 template <
typename S>
197 void* data, S& dist) {
198 assert(data !=
nullptr);
212 if (dist <= 0)
return true;
219 #endif // FCL_BROADPHASE_DEFAULTBROADPHASECALLBACKS_H size_t numContacts() const
number of contacts found
ContinuousCollisionResult< S > result
S min_distance
Minimum distance between two objects.
CollisionRequest< S > request
bool DefaultDistanceFunction(CollisionObject< S > *o1, CollisionObject< S > *o2, void *data, S &dist)
Provides a simple callback for the distance query in the BroadPhaseCollisionManager. It assumes the data parameter is non-null and points to an instance of DefaultDistanceData. It simply invokes the distance() method on the culled pair of geometries and stores the results in the data's DistanceResult instance.
bool done
If true, requests that the broadphase evaluation stop.
S distance(const Eigen::MatrixBase< DerivedA > &R0, const Eigen::MatrixBase< DerivedB > &T0, const kIOS< S > &b1, const kIOS< S > &b2, Vector3< S > *P, Vector3< S > *Q)
Approximate distance between two kIOS bounding volumes.
the object for continuous collision or distance computation, contains the geometry and the motion inf...
bool DefaultContinuousCollisionFunction(ContinuousCollisionObject< S > *o1, ContinuousCollisionObject< S > *o2, void *data)
Provides a simple callback for the continuous collision query in the BroadPhaseCollisionManager. It assumes the data parameter is non-null and points to an instance of DefaultContinuousCollisionData. It simply invokes the collide() method on the culled pair of geometries and stores the results in the data's ContinuousCollisionResult instance.
template FCL_EXPORT std::size_t collide(const CollisionObject< double > *o1, const CollisionObject< double > *o2, const CollisionRequest< double > &request, CollisionResult< double > &result)
Parameters for performing collision request.
DistanceRequest< S > request
Distance data for use with the DefaultDistanceFunction. It stores the distance request and the result...
CollisionResult< S > result
continuous collision result
the object for collision or distance computation, contains the geometry and the transform information...
Collision data for use with the DefaultCollisionFunction. It stores the collision request and the res...
ContinuousCollisionRequest< S > request
Collision data for use with the DefaultContinuousCollisionFunction. It stores the collision request a...
DistanceResult< S > result
bool DefaultCollisionFunction(CollisionObject< S > *o1, CollisionObject< S > *o2, void *data)
Provides a simple callback for the collision query in the BroadPhaseCollisionManager. It assumes the data parameter is non-null and points to an instance of DefaultCollisionData. It simply invokes the collide() method on the culled pair of geometries and stores the results in the data's CollisionResult instance.
bool isCollision() const
return binary collision result
request to the distance computation