------------------------------------------------------------------------------
| 657 | |
| 658 | //------------------------------------------------------------------------------ |
| 659 | void vtkOverlappingAMRMetaData::GetBounds(unsigned int level, unsigned int id, double* bb) |
| 660 | { |
| 661 | unsigned int index = this->GetAbsoluteBlockIndex(level, id); |
| 662 | if (this->HasBlockBounds(index)) |
| 663 | { |
| 664 | const vtkBoundingBox& bounds = this->BlockBounds[index]; |
| 665 | if (bounds.IsValid()) |
| 666 | { |
| 667 | bounds.GetBounds(bb); |
| 668 | } |
| 669 | else |
| 670 | { |
| 671 | vtkErrorMacro("Could not GetBounds, please SetBounds for all blocks"); |
| 672 | } |
| 673 | } |
| 674 | else if (this->HasSpacing(level)) |
| 675 | { |
| 676 | const vtkAMRBox& box = this->Boxes[index]; |
| 677 | vtkAMRBox::GetBounds(box, this->Origin, this->Spacing->GetTuple(level), bb); |
| 678 | } |
| 679 | else |
| 680 | { |
| 681 | vtkErrorMacro("Could not GetBounds, please set Spacing or BlockBounds"); |
| 682 | } |
| 683 | } |
| 684 | |
| 685 | //------------------------------------------------------------------------------ |
| 686 | const vtkAMRBox& vtkOverlappingAMRMetaData::GetAMRBox(unsigned int level, unsigned int id) const |
no test coverage detected