------------------------------------------------------------------------------
| 1450 | |
| 1451 | //------------------------------------------------------------------------------ |
| 1452 | void vtkHyperTreeGrid::GetLevelZeroCoordinatesFromIndex( |
| 1453 | vtkIdType treeindex, unsigned int& i, unsigned int& j, unsigned int& k) const |
| 1454 | { |
| 1455 | // Distinguish between two cases depending on indexing order |
| 1456 | if (this->TransposedRootIndexing) |
| 1457 | { |
| 1458 | unsigned long nbKxJ = |
| 1459 | static_cast<unsigned long>(this->CellDims[2]) * static_cast<unsigned long>(this->CellDims[1]); |
| 1460 | i = static_cast<unsigned int>(treeindex / nbKxJ); |
| 1461 | vtkIdType reste = treeindex - i * nbKxJ; |
| 1462 | j = static_cast<unsigned int>(reste / this->CellDims[2]); |
| 1463 | k = static_cast<unsigned int>(reste - j * this->CellDims[2]); |
| 1464 | } |
| 1465 | else |
| 1466 | { |
| 1467 | unsigned long nbIxJ = this->CellDims[0] * this->CellDims[1]; |
| 1468 | k = static_cast<unsigned int>(treeindex / nbIxJ); |
| 1469 | vtkIdType reste = treeindex - k * nbIxJ; |
| 1470 | j = static_cast<unsigned int>(reste / this->CellDims[0]); |
| 1471 | i = static_cast<unsigned int>(reste - j * this->CellDims[0]); |
| 1472 | } |
| 1473 | |
| 1474 | assert(i < this->CellDims[0]); |
| 1475 | assert(j < this->CellDims[1]); |
| 1476 | assert(k < this->CellDims[2]); |
| 1477 | } |
| 1478 | |
| 1479 | //------------------------------------------------------------------------------ |
| 1480 | void vtkHyperTreeGrid::GetLevelZeroOriginAndSizeFromIndex( |
no test coverage detected