------------------------------------------------------------------------------
| 456 | |
| 457 | //------------------------------------------------------------------------------ |
| 458 | void vtkAxisAlignedTransformFilter::CopyAndRotate(vtkHyperTree* input, vtkHyperTree* output, |
| 459 | vtkIdType inputIndex, vtkIdType outputIndex, const std::vector<unsigned int>& permutation, |
| 460 | unsigned int depth, vtkHyperTreeGridNonOrientedCursor* cursor) |
| 461 | { |
| 462 | if (cursor->IsLeaf() || cursor->IsMasked()) |
| 463 | { |
| 464 | if (!cursor->IsRoot()) |
| 465 | { |
| 466 | cursor->ToParent(); |
| 467 | } |
| 468 | return; |
| 469 | } |
| 470 | |
| 471 | output->SubdivideLeaf(outputIndex, depth); |
| 472 | |
| 473 | vtkIdType inputBase = input->GetElderChildIndex(inputIndex); |
| 474 | vtkIdType outputBase = output->GetElderChildIndex(outputIndex); |
| 475 | |
| 476 | size_t nChildren = permutation.size(); |
| 477 | |
| 478 | // For each child index in the output, determine the corresponding |
| 479 | // child in the input using the permutation vector |
| 480 | for (size_t i = 0; i < nChildren; ++i) |
| 481 | { |
| 482 | vtkIdType inputChildIndex = inputBase + permutation[i]; |
| 483 | vtkIdType outputChildIndex = outputBase + i; |
| 484 | |
| 485 | cursor->ToChild(permutation[i]); |
| 486 | this->CopyAndRotate( |
| 487 | input, output, inputChildIndex, outputChildIndex, permutation, depth + 1, cursor); |
| 488 | } |
| 489 | if (!cursor->IsRoot()) |
| 490 | { |
| 491 | cursor->ToParent(); |
| 492 | } |
| 493 | } |
| 494 | |
| 495 | //------------------------------------------------------------------------------ |
| 496 | void ApplyMask(vtkHyperTree* input, vtkHyperTree* output, vtkIdType inputIndex, |
no test coverage detected