Skip to content

Commit

Permalink
[broadphase] clear data in init of default callback
Browse files Browse the repository at this point in the history
  • Loading branch information
lmontaut committed Jan 4, 2024
1 parent 7be1fa1 commit db013de
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/hpp/fcl/broadphase/default_broadphase_callbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ bool defaultDistanceFunction(CollisionObject* o1, CollisionObject* o2,
/// @brief Default collision callback to check collision between collision
/// objects.
struct HPP_FCL_DLLAPI CollisionCallBackDefault : CollisionCallBackBase {
/// @brief Initialize the callback.
/// Clears the collision result and sets the done boolean to false.
void init() { data.clear(); }

bool collide(CollisionObject* o1, CollisionObject* o2);

CollisionData data;
Expand All @@ -205,6 +209,10 @@ struct HPP_FCL_DLLAPI CollisionCallBackDefault : CollisionCallBackBase {
/// @brief Default distance callback to check collision between collision
/// objects.
struct HPP_FCL_DLLAPI DistanceCallBackDefault : DistanceCallBackBase {
/// @brief Initialize the callback.
/// Clears the distance result and sets the done boolean to false.
void init() { data.clear(); }

bool distance(CollisionObject* o1, CollisionObject* o2, FCL_REAL& dist);

DistanceData data;
Expand Down

0 comments on commit db013de

Please sign in to comment.