| 576 | //------------------------------------------------------------------------------ |
| 577 | template <class Cursor, class Worker> |
| 578 | void vtkHyperTreeGridGradient::RecursivelyProcessGradientTree(Cursor* supercursor, Worker& worker) |
| 579 | { |
| 580 | // Retrieve global index of input cursor |
| 581 | vtkIdType id = supercursor->GetGlobalNodeIndex(); |
| 582 | |
| 583 | if (this->InGhostArray && this->InGhostArray->GetTuple1(id)) |
| 584 | { |
| 585 | return; |
| 586 | } |
| 587 | |
| 588 | // Descend further into input trees only if cursor is not a leaf |
| 589 | if (!IsLeaf(supercursor)) |
| 590 | { |
| 591 | unsigned int numChildren = supercursor->GetNumberOfChildren(); |
| 592 | for (unsigned int child = 0; child < numChildren; ++child) |
| 593 | { |
| 594 | // Create child cursor from parent in input grid |
| 595 | supercursor->ToChild(child); |
| 596 | // Recurse |
| 597 | this->RecursivelyProcessGradientTree(supercursor, worker); |
| 598 | supercursor->ToParent(); |
| 599 | } |
| 600 | } |
| 601 | else if (!this->InMask || !this->InMask->GetTuple1(id)) |
| 602 | { |
| 603 | worker.AccumulateGradienAt(supercursor); |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | //------------------------------------------------------------------------------ |
| 608 | template <class Worker> |
no test coverage detected