* Recursively deep copy the input tree pointed by the cursor * to the output, ignoring masked branches. This will create a new HTG * with a totally different internal structure, * that should still be identical to the original one. */
| 1017 | * that should still be identical to the original one. |
| 1018 | */ |
| 1019 | void CopyInputTreeToOutput(vtkHyperTreeGridNonOrientedCursor* inCursor, |
| 1020 | vtkHyperTreeGridNonOrientedCursor* outCursor, vtkCellData* inCellData, vtkCellData* outCellData, |
| 1021 | vtkBitArray* inMask, vtkBitArray* outMask) |
| 1022 | { |
| 1023 | vtkIdType outIdx = outCursor->GetGlobalNodeIndex(); |
| 1024 | vtkIdType inIdx = inCursor->GetGlobalNodeIndex(); |
| 1025 | if (inMask) |
| 1026 | { |
| 1027 | outMask->InsertTuple1(outIdx, inMask->GetValue(inIdx)); |
| 1028 | } |
| 1029 | outCellData->InsertTuple(outIdx, inIdx, inCellData); |
| 1030 | if (!inCursor->IsMasked()) |
| 1031 | { |
| 1032 | if (!inCursor->IsLeaf()) |
| 1033 | { |
| 1034 | outCursor->SubdivideLeaf(); |
| 1035 | for (int ichild = 0; ichild < inCursor->GetNumberOfChildren(); ++ichild) |
| 1036 | { |
| 1037 | outCursor->ToChild(ichild); |
| 1038 | inCursor->ToChild(ichild); |
| 1039 | ::CopyInputTreeToOutput(inCursor, outCursor, inCellData, outCellData, inMask, outMask); |
| 1040 | outCursor->ToParent(); |
| 1041 | inCursor->ToParent(); |
| 1042 | } |
| 1043 | } |
| 1044 | } |
| 1045 | } |
| 1046 | |
| 1047 | /** |
| 1048 | * Compare HyperTreeGrid with a different memory layout. |
no test coverage detected