bounding_boxes_intersect_3d#

regridding.geometry.bounding_boxes_intersect_3d(x_p1, y_p1, z_p1, x_p2, y_p2, z_p2, x_q1, y_q1, z_q1, x_q2, y_q2, z_q2)[source]#

Test if two bounding boxes, \(p\) and \(q\), intersect.

If the edges of the two boxes are touching, it’s counted as an intersection.

Parameters:
  • x_p1 (float) – \(x\)-coordinate of the first point of box \(p\)

  • y_p1 (float) – \(y\)-coordinate of the first point of box \(p\)

  • z_p1 (float) – \(z\)-coordinate of the first point of box \(p\)

  • x_p2 (float) – \(x\)-coordinate of the second point of box \(p\)

  • y_p2 (float) – \(y\)-coordinate of the second point of box \(p\)

  • z_p2 (float) – \(z\)-coordinate of the second point of box \(p\)

  • x_q1 (float) – \(x\)-coordinate of the first point of box \(q\)

  • y_q1 (float) – \(y\)-coordinate of the first point of box \(q\)

  • z_q1 (float) – \(z\)-coordinate of the first point of box \(q\)

  • x_q2 (float) – \(x\)-coordinate of the second point of box \(q\)

  • y_q2 (float) – \(y\)-coordinate of the second point of box \(q\)

  • z_q2 (float) – \(z\)-coordinate of the second point of box \(q\)

Return type:

bool