------------------------------------------------------------------------------
| 1040 | |
| 1041 | //------------------------------------------------------------------------------ |
| 1042 | void vtkOverlappingAMRMetaData::UpdateBounds(int level, int id) |
| 1043 | { |
| 1044 | double bb[6]; |
| 1045 | |
| 1046 | unsigned int index = this->GetAbsoluteBlockIndex(level, id); |
| 1047 | bool update = false; |
| 1048 | if (this->HasBlockBounds(index)) |
| 1049 | { |
| 1050 | const vtkBoundingBox& blockBounds = this->BlockBounds[index]; |
| 1051 | blockBounds.GetBounds(bb); |
| 1052 | update = true; |
| 1053 | } |
| 1054 | else if (this->HasSpacing(level)) |
| 1055 | { |
| 1056 | vtkAMRBox::GetBounds( |
| 1057 | this->GetAMRBox(level, id), this->Origin, this->Spacing->GetTuple(level), bb); |
| 1058 | update = true; |
| 1059 | } |
| 1060 | |
| 1061 | if (update) |
| 1062 | { |
| 1063 | for (int i = 0; i < 3; ++i) |
| 1064 | { |
| 1065 | this->Bounds[i * 2] = std::min(bb[i * 2], this->Bounds[i * 2]); |
| 1066 | this->Bounds[i * 2 + 1] = std::max(bb[i * 2 + 1], this->Bounds[i * 2 + 1]); |
| 1067 | } // END for each dimension |
| 1068 | } |
| 1069 | } |
| 1070 | |
| 1071 | //------------------------------------------------------------------------------ |
| 1072 | void vtkOverlappingAMRMetaData::DeepCopy(vtkAMRMetaData* other) |
no test coverage detected