------------------------------------------------------------------------------
| 118 | |
| 119 | //------------------------------------------------------------------------------ |
| 120 | void vtkXMLHyperTreeGridReader::CalculateHTs(const vtkHyperTreeGrid* grid) |
| 121 | { |
| 122 | assert("pre: already_done" && !this->FixedHTs); |
| 123 | if (this->SelectedHTs == COORDINATES_BOUNDING_BOX) |
| 124 | { |
| 125 | this->SelectedHTs = INDICES_BOUNDING_BOX; |
| 126 | // if coord_min{x,y,z} < HTG->coord_min{x,y,z} then ht_idx{x,y,z} = 0 |
| 127 | double htg_bbox[6]; |
| 128 | const_cast<vtkHyperTreeGrid*>(grid)->GetGridBounds(htg_bbox); |
| 129 | this->IndicesBoundingBox[0] = this->CoordinatesBoundingBox[0] <= htg_bbox[0] |
| 130 | ? 0 |
| 131 | : grid->FindDichotomicX(this->CoordinatesBoundingBox[0]); |
| 132 | this->IndicesBoundingBox[1] = grid->FindDichotomicX(this->CoordinatesBoundingBox[1]); |
| 133 | this->IndicesBoundingBox[2] = this->CoordinatesBoundingBox[2] <= htg_bbox[2] |
| 134 | ? 0 |
| 135 | : grid->FindDichotomicY(this->CoordinatesBoundingBox[2]); |
| 136 | this->IndicesBoundingBox[3] = grid->FindDichotomicY(this->CoordinatesBoundingBox[3]); |
| 137 | this->IndicesBoundingBox[4] = this->CoordinatesBoundingBox[4] <= htg_bbox[4] |
| 138 | ? 0 |
| 139 | : grid->FindDichotomicZ(this->CoordinatesBoundingBox[4]); |
| 140 | this->IndicesBoundingBox[5] = grid->FindDichotomicZ(this->CoordinatesBoundingBox[5]); |
| 141 | } |
| 142 | this->FixedHTs = true; |
| 143 | } |
| 144 | |
| 145 | //------------------------------------------------------------------------------ |
| 146 | bool vtkXMLHyperTreeGridReader::IsSelectedHT(const vtkHyperTreeGrid* grid, vtkIdType treeIndx) const |
no test coverage detected