------------------------------------------------------------------------------
| 710 | |
| 711 | //------------------------------------------------------------------------------ |
| 712 | void vtkAMRBox::Shrink(int byN) |
| 713 | { |
| 714 | assert("pre: AMR Box instance is invalid" && !this->IsInvalid()); |
| 715 | // TODO: One question here is, should we allow negative indices? |
| 716 | // Or should we otherwise, ensure that the box is grown with |
| 717 | // bounds. |
| 718 | for (int q = 0; q < 3; ++q) |
| 719 | { |
| 720 | if (!this->EmptyDimension(q)) |
| 721 | { |
| 722 | this->LoCorner[q] += byN; |
| 723 | this->HiCorner[q] -= byN; |
| 724 | } |
| 725 | } |
| 726 | assert("post: Grown AMR Box instance is invalid" && !this->IsInvalid()); |
| 727 | } |
| 728 | |
| 729 | //------------------------------------------------------------------------------ |
| 730 | int vtkAMRBox::InitializeGrid(vtkUniformGrid* grid, double* origin, double* spacing) const |