------------------------------------------------------------------------------ Fills array_map with matching arrays from data1 to data2
| 57 | //------------------------------------------------------------------------------ |
| 58 | // Fills array_map with matching arrays from data1 to data2 |
| 59 | static void vtkMergeGraphsCreateArrayMapping( |
| 60 | std::map<vtkAbstractArray*, vtkAbstractArray*>& array_map, vtkDataSetAttributes* data1, |
| 61 | vtkDataSetAttributes* data2) |
| 62 | { |
| 63 | vtkIdType narr1 = data1->GetNumberOfArrays(); |
| 64 | for (int arr1 = 0; arr1 < narr1; ++arr1) |
| 65 | { |
| 66 | vtkAbstractArray* a1 = data1->GetAbstractArray(arr1); |
| 67 | vtkAbstractArray* a2 = data2->GetAbstractArray(a1->GetName()); |
| 68 | if (a2 && a1->GetDataType() == a2->GetDataType() && |
| 69 | a1->GetNumberOfComponents() == a2->GetNumberOfComponents()) |
| 70 | { |
| 71 | array_map[a1] = a2; |
| 72 | } |
| 73 | } |
| 74 | // Force pedigree id array to match |
| 75 | if (data1->GetPedigreeIds() && data2->GetPedigreeIds()) |
| 76 | array_map[data1->GetPedigreeIds()] = data2->GetPedigreeIds(); |
| 77 | } |
| 78 | |
| 79 | //------------------------------------------------------------------------------ |
| 80 | // Uses array_map to append a row to data1 corresponding to |
no test coverage detected