Returns true if this BBox shares any area in common with another.
| 65 | |
| 66 | // Returns true if this BBox shares any area in common with another. |
| 67 | bool overlaps(const BBox& other) const |
| 68 | { |
| 69 | return |
| 70 | std::abs(center.x - other.center.x) < |
| 71 | halfWidth + other.halfWidth && |
| 72 | std::abs(center.y - other.center.y) < |
| 73 | halfHeight + other.halfHeight; |
| 74 | } |
| 75 | |
| 76 | bool overlaps( |
| 77 | const double xBegin, |