------------------------------------------------------------------------------
| 61 | |
| 62 | //------------------------------------------------------------------------------ |
| 63 | void vtkBoundingBox::AddBounds(const double bounds[6]) |
| 64 | { |
| 65 | bool this_valid = (this->IsValid() != 0); |
| 66 | bool other_valid = (vtkBoundingBox::IsValid(bounds) != 0); |
| 67 | |
| 68 | if (!other_valid) |
| 69 | { |
| 70 | return; |
| 71 | } |
| 72 | |
| 73 | if (other_valid && !this_valid) |
| 74 | { |
| 75 | this->SetBounds(bounds); |
| 76 | return; |
| 77 | } |
| 78 | |
| 79 | this->MinPnt[0] = std::min(bounds[0], this->MinPnt[0]); |
| 80 | this->MaxPnt[0] = std::max(bounds[1], this->MaxPnt[0]); |
| 81 | this->MinPnt[1] = std::min(bounds[2], this->MinPnt[1]); |
| 82 | this->MaxPnt[1] = std::max(bounds[3], this->MaxPnt[1]); |
| 83 | this->MinPnt[2] = std::min(bounds[4], this->MinPnt[2]); |
| 84 | this->MaxPnt[2] = std::max(bounds[5], this->MaxPnt[2]); |
| 85 | } |
| 86 | |
| 87 | //------------------------------------------------------------------------------ |
| 88 | void vtkBoundingBox::SetBounds( |