------------------------------------------------------------------------------
| 144 | |
| 145 | //------------------------------------------------------------------------------ |
| 146 | bool vtkXMLHyperTreeGridReader::IsSelectedHT(const vtkHyperTreeGrid* grid, vtkIdType treeIndx) const |
| 147 | { |
| 148 | assert("pre: not_calculateHTs" && this->FixedHTs); |
| 149 | switch (this->SelectedHTs) |
| 150 | { |
| 151 | case vtkXMLHyperTreeGridReader::ALL: |
| 152 | return true; |
| 153 | case vtkXMLHyperTreeGridReader::INDICES_BOUNDING_BOX: |
| 154 | unsigned int i, j, k; |
| 155 | grid->GetLevelZeroCoordinatesFromIndex(treeIndx, i, j, k); |
| 156 | return this->IndicesBoundingBox[0] <= i && i <= this->IndicesBoundingBox[1] && |
| 157 | this->IndicesBoundingBox[2] <= j && j <= this->IndicesBoundingBox[3] && |
| 158 | this->IndicesBoundingBox[4] <= k && k <= this->IndicesBoundingBox[5]; |
| 159 | case vtkXMLHyperTreeGridReader::IDS_SELECTED: |
| 160 | if (this->Verbose) |
| 161 | { |
| 162 | std::cerr << "treeIndx:" << treeIndx << " " |
| 163 | << (this->IdsSelected.find(treeIndx) != this->IdsSelected.end()) << std::endl; |
| 164 | } |
| 165 | return this->IdsSelected.find(treeIndx) != this->IdsSelected.end(); |
| 166 | default: |
| 167 | break; |
| 168 | } |
| 169 | return false; |
| 170 | } |
| 171 | |
| 172 | //------------------------------------------------------------------------------ |
| 173 | unsigned int vtkXMLHyperTreeGridReader::GetFixedLevelOfThisHT( |
no test coverage detected