------------------------------------------------------------------------------
| 558 | |
| 559 | //------------------------------------------------------------------------------ |
| 560 | vtkIdType vtkHyperTreeGridGeometricLocator::FindChildIndex( |
| 561 | unsigned int dim, unsigned int bf, const double normalizedPt[3]) const |
| 562 | { |
| 563 | std::vector<int> binPt(dim, -1); |
| 564 | for (unsigned int d = 0; d < dim; d++) |
| 565 | { |
| 566 | binPt[d] = std::distance(this->Bins1D.begin(), |
| 567 | std::upper_bound(this->Bins1D.begin(), this->Bins1D.end(), normalizedPt[d])); |
| 568 | } |
| 569 | |
| 570 | // convert tuple index to single index |
| 571 | vtkIdType childIndex = 0; |
| 572 | for (unsigned int d = 0; d < dim; d++) |
| 573 | { |
| 574 | childIndex *= bf; |
| 575 | childIndex += binPt[dim - d - 1]; |
| 576 | } |
| 577 | return childIndex; |
| 578 | } |
| 579 | |
| 580 | //------------------------------------------------------------------------------ |
| 581 | bool vtkHyperTreeGridGeometricLocator::CheckLeafOrChildrenMasked( |
no test coverage detected