------------------------------------------------------------------------------
| 1360 | |
| 1361 | //------------------------------------------------------------------------------ |
| 1362 | void vtkHyperTreeGrid::GetIndexFromLevelZeroCoordinates( |
| 1363 | vtkIdType& treeindex, unsigned int i, unsigned int j, unsigned int k) const |
| 1364 | { |
| 1365 | // Distinguish between two cases depending on indexing order |
| 1366 | if (this->TransposedRootIndexing) |
| 1367 | { |
| 1368 | treeindex = static_cast<vtkIdType>(k) + |
| 1369 | static_cast<vtkIdType>(this->CellDims[2]) * |
| 1370 | (static_cast<vtkIdType>(j) + |
| 1371 | static_cast<vtkIdType>(i) * static_cast<vtkIdType>(this->CellDims[1])); |
| 1372 | } |
| 1373 | else |
| 1374 | { |
| 1375 | treeindex = static_cast<vtkIdType>(i) + |
| 1376 | static_cast<vtkIdType>(this->CellDims[0]) * |
| 1377 | (static_cast<vtkIdType>(j) + |
| 1378 | static_cast<vtkIdType>(k) * static_cast<vtkIdType>(this->CellDims[1])); |
| 1379 | } |
| 1380 | } |
| 1381 | |
| 1382 | //------------------------------------------------------------------------------ |
| 1383 | // The shift is a request along each of the axes I,J,K |
no outgoing calls