------------------------------------------------------------------------------ Uses array_map to append a row to data1 corresponding to row index2 of mapped arrays (which came from data2)
| 80 | // Uses array_map to append a row to data1 corresponding to |
| 81 | // row index2 of mapped arrays (which came from data2) |
| 82 | static void vtkMergeGraphsAddRow(vtkDataSetAttributes* data1, vtkIdType index2, |
| 83 | std::map<vtkAbstractArray*, vtkAbstractArray*>& array_map) |
| 84 | { |
| 85 | int narr1 = data1->GetNumberOfArrays(); |
| 86 | for (int arr1 = 0; arr1 < narr1; ++arr1) |
| 87 | { |
| 88 | vtkAbstractArray* a1 = data1->GetAbstractArray(arr1); |
| 89 | if (array_map.find(a1) != array_map.end()) |
| 90 | { |
| 91 | vtkAbstractArray* a2 = array_map[a1]; |
| 92 | a1->InsertNextTuple(index2, a2); |
| 93 | } |
| 94 | else |
| 95 | { |
| 96 | vtkIdType num_values = a1->GetNumberOfTuples() * a1->GetNumberOfComponents(); |
| 97 | for (vtkIdType i = 0; i < a1->GetNumberOfComponents(); ++i) |
| 98 | { |
| 99 | a1->InsertVariantValue(num_values + i, vtkVariant()); |
| 100 | } |
| 101 | } |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | //------------------------------------------------------------------------------ |
| 106 | int vtkMergeGraphs::RequestData( |
no test coverage detected