Calculate the box->box distance.
410{
411
413 return 0.0;
414
416 {
418 return pt_distance(a->xmax, a->ymin, b->xmin, b->ymax);
420 return pt_distance(a->xmax, a->ymax, b->xmin, b->ymin);
421 else
422 return (double)b->xmin - (double)a->xmax;
423 }
425 {
427 return pt_distance(a->xmin, a->ymin, b->xmax, b->ymax);
429 return pt_distance(a->xmin, a->ymax, b->xmax, b->ymin);
430 else
431 return (double)a->xmin - (double)b->xmax;
432 }
434 {
436 return pt_distance(a->xmax, a->ymin, b->xmin, b->ymax);
438 return pt_distance(a->xmin, a->ymin, b->xmax, b->ymax);
439 else
440 return (double)a->ymin - (double)b->ymax;
441 }
443 {
445 return pt_distance(a->xmax, a->ymax, b->xmin, b->ymin);
447 return pt_distance(a->xmin, a->ymax, b->xmax, b->ymin);
448 else
449 return (double)b->ymin - (double)a->ymax;
450 }
451
452 return FLT_MAX;
453}
bool box2df_left(const BOX2DF *a, const BOX2DF *b)
bool box2df_right(const BOX2DF *a, const BOX2DF *b)
bool box2df_overlaps(const BOX2DF *a, const BOX2DF *b)
bool box2df_above(const BOX2DF *a, const BOX2DF *b)
static double pt_distance(double ax, double ay, double bx, double by)
bool box2df_below(const BOX2DF *a, const BOX2DF *b)