Return whether this bounding box overlaps with the other bounding box. Parameters ---------- other : `.BboxBase`
(self, other)
| 421 | return self.containsx(x) and self.containsy(y) |
| 422 | |
| 423 | def overlaps(self, other): |
| 424 | """ |
| 425 | Return whether this bounding box overlaps with the other bounding box. |
| 426 | |
| 427 | Parameters |
| 428 | ---------- |
| 429 | other : `.BboxBase` |
| 430 | """ |
| 431 | ax1, ay1, ax2, ay2 = self.extents |
| 432 | bx1, by1, bx2, by2 = other.extents |
| 433 | if ax2 < ax1: |
| 434 | ax2, ax1 = ax1, ax2 |
| 435 | if ay2 < ay1: |
| 436 | ay2, ay1 = ay1, ay2 |
| 437 | if bx2 < bx1: |
| 438 | bx2, bx1 = bx1, bx2 |
| 439 | if by2 < by1: |
| 440 | by2, by1 = by1, by2 |
| 441 | return ax1 <= bx2 and bx1 <= ax2 and ay1 <= by2 and by1 <= ay2 |
| 442 | |
| 443 | def fully_containsx(self, x): |
| 444 | """ |
no outgoing calls