------------------------------------------------------------------------------
| 98 | |
| 99 | //------------------------------------------------------------------------------ |
| 100 | void vtkAMRMetaData::ComputeIndexPair(unsigned int index, unsigned int& level, unsigned int& id) |
| 101 | { |
| 102 | this->GenerateBlockLevel(); |
| 103 | |
| 104 | if (static_cast<vtkIdType>(index) >= this->BlockLevel->GetNumberOfValues()) |
| 105 | { |
| 106 | vtkErrorMacro("Invalid index to ComputeIndexPair: " << index << " " |
| 107 | << this->BlockLevel->GetNumberOfValues()); |
| 108 | return; |
| 109 | } |
| 110 | |
| 111 | level = this->BlockLevel->GetValue(static_cast<vtkIdType>(index)); |
| 112 | id = index - this->NumBlocks[level]; |
| 113 | } |
| 114 | |
| 115 | //------------------------------------------------------------------------------ |
| 116 | void vtkAMRMetaData::GenerateBlockLevel() |