------------------------------------------------------------------------------
| 56 | |
| 57 | //------------------------------------------------------------------------------ |
| 58 | int vtkHyperTreeGridFeatureEdges::ProcessTrees(vtkHyperTreeGrid* input, vtkDataObject* outputDO) |
| 59 | { |
| 60 | vtkPolyData* output = vtkPolyData::SafeDownCast(outputDO); |
| 61 | if (!output) |
| 62 | { |
| 63 | vtkErrorMacro("Incorrect type of output: " << outputDO->GetClassName()); |
| 64 | return 0; |
| 65 | } |
| 66 | |
| 67 | this->InData = input->GetCellData(); |
| 68 | this->OutData = output->GetCellData(); |
| 69 | this->OutData->CopyAllocate(this->InData); |
| 70 | |
| 71 | vtkNew<vtkPoints> outPoints; |
| 72 | vtkNew<vtkCellArray> outCells; |
| 73 | |
| 74 | if (this->MergePoints) |
| 75 | { |
| 76 | this->Locator = vtkSmartPointer<vtkMergePoints>::New(); |
| 77 | this->Locator->InitPointInsertion(outPoints, input->GetBounds()); |
| 78 | } |
| 79 | else |
| 80 | { |
| 81 | this->Locator = nullptr; |
| 82 | } |
| 83 | |
| 84 | // Create a custom internal class depending on the dimension of the input HTG. |
| 85 | switch (input->GetDimension()) |
| 86 | { |
| 87 | case 1: |
| 88 | this->OrientationAxe1D = input->GetOrientation(); |
| 89 | this->Process1DHTG(input, outPoints, outCells); |
| 90 | break; |
| 91 | case 2: |
| 92 | this->OrientationAxes2D = ORIENTATION_AXES_2D[input->GetOrientation()]; |
| 93 | this->Process2DHTG(input, outPoints, outCells); |
| 94 | break; |
| 95 | case 3: |
| 96 | this->Process3DHTG(input, outPoints, outCells); |
| 97 | break; |
| 98 | default: |
| 99 | vtkErrorMacro("Incorrect dimension of input HTG: " << input->GetDimension()); |
| 100 | return 0; |
| 101 | } |
| 102 | |
| 103 | output->SetPoints(outPoints); |
| 104 | output->SetLines(outCells); |
| 105 | |
| 106 | return 1; |
| 107 | } |
| 108 | |
| 109 | //---------------------------------------------------------------------------------------------- |
| 110 | void vtkHyperTreeGridFeatureEdges::Process1DHTG( |
nothing calls this directly
no test coverage detected