------------------------------------------------------------------------------
| 278 | |
| 279 | //------------------------------------------------------------------------------ |
| 280 | bool vtkAMRBox::IntersectBoxAlongDimension(const vtkAMRBox& other, int q) |
| 281 | { |
| 282 | assert("pre: dimension is out-of-bounds!" && (q >= 0) && (q <= 2)); |
| 283 | bool e1 = this->EmptyDimension(q); |
| 284 | bool e2 = other.EmptyDimension(q); |
| 285 | if (e1 && e2) |
| 286 | { |
| 287 | return true; |
| 288 | } |
| 289 | if (e1 || e2) |
| 290 | { |
| 291 | return false; |
| 292 | } |
| 293 | this->LoCorner[q] = std::max(this->LoCorner[q], other.LoCorner[q]); |
| 294 | this->HiCorner[q] = std::min(this->HiCorner[q], other.HiCorner[q]); |
| 295 | if (this->LoCorner[q] > this->HiCorner[q]) |
| 296 | { |
| 297 | return false; |
| 298 | } |
| 299 | return true; |
| 300 | } |
| 301 | |
| 302 | bool vtkAMRBox::Intersect(const vtkAMRBox& other) |
| 303 | { |