------------------------------------------------------------------------------
| 20 | |
| 21 | //------------------------------------------------------------------------------ |
| 22 | vtkRenderedGraphRepresentation* vtkHierarchicalGraphView::GetGraphRepresentation() |
| 23 | { |
| 24 | vtkRenderedHierarchyRepresentation* graphRep = nullptr; |
| 25 | for (int i = 0; i < this->GetNumberOfRepresentations(); ++i) |
| 26 | { |
| 27 | vtkDataRepresentation* rep = this->GetRepresentation(i); |
| 28 | graphRep = vtkRenderedHierarchyRepresentation::SafeDownCast(rep); |
| 29 | if (graphRep) |
| 30 | { |
| 31 | break; |
| 32 | } |
| 33 | } |
| 34 | if (!graphRep) |
| 35 | { |
| 36 | vtkSmartPointer<vtkTree> t = vtkSmartPointer<vtkTree>::New(); |
| 37 | graphRep = |
| 38 | vtkRenderedHierarchyRepresentation::SafeDownCast(this->AddRepresentationFromInput(t)); |
| 39 | vtkSmartPointer<vtkDirectedGraph> g = vtkSmartPointer<vtkDirectedGraph>::New(); |
| 40 | graphRep->SetInputData(1, g); |
| 41 | } |
| 42 | return graphRep; |
| 43 | } |
| 44 | |
| 45 | //------------------------------------------------------------------------------ |
| 46 | vtkRenderedHierarchyRepresentation* vtkHierarchicalGraphView::GetHierarchyRepresentation() |
no test coverage detected