The collision checker V-collide does not compute the distance between polyhedrons of the scene. The collision checker I-collide computes it for the polyhedrons whose bounding boxes overlap. Anyway, one can always compute an approached distance between two objects of a scene using their bounding boxes.
The function double p3d_BB_obj_obj_extern_dist(p3d_obj *obj1, p3d_obj *obj2) returns the distance between the bounding boxes of obj1 and obj2. The function double p3d_calc_robot_BB_extern_dist(p3d_rob *rob, int *obstnum) returns the shortest distance between the bounding boxes of the bodies of the robot and the bounding boxe of the obstacle. The variable obstnum contains the number of teh closest obstacle to the robot. The function double p3d_calc_body_BB_extern_dist(p3d_obj *body, int *obstnum) returns the closest distance from the bounding box of the body body in its current position to the bounding boxes of the obstacles. The integer obstnum is the closest obstacle to body.
Knowing when the bounding boxes of a robot, a body of a robot or an obstacle overlap can also be useful. For this purpose, the user may call the three following functions. The function int p3d_BB_overlap_obj_obj(p3d_obj *obj1, p3d_obj *obj2) checks if the bounding boxes of the objects obj1 and obj2 overlap. The functions int p3d_BB_overlap_rob_obj(p3d_rob *rob, p3d_obj *obj) and int p3d_BB_overlap_rob _rob(p3d_rob *rob1, p3d_rob *rob2) for the robot rob and the object obj and for the robots rob1 and rob2.
Those functions are mostly used for the validation of trajectories described in the following chapters.