MCPcopy Create free account
hub / github.com/Kitware/VTK / vtkGraphMapper

Method vtkGraphMapper

Rendering/Core/vtkGraphMapper.cxx:43–123  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

41
42//------------------------------------------------------------------------------
43vtkGraphMapper::vtkGraphMapper()
44{
45 this->GraphToPoly = vtkSmartPointer<vtkGraphToPolyData>::New();
46 this->VertexGlyph = vtkSmartPointer<vtkVertexGlyphFilter>::New();
47 this->IconTypeToIndex = vtkSmartPointer<vtkMapArrayValues>::New();
48 this->CircleGlyph = vtkSmartPointer<vtkGlyph3D>::New();
49 this->CircleOutlineGlyph = vtkSmartPointer<vtkGlyph3D>::New();
50 this->IconGlyph = vtkSmartPointer<vtkIconGlyphFilter>::New();
51 this->IconTransform = vtkSmartPointer<vtkTransformCoordinateSystems>::New();
52 this->EdgeMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
53 this->VertexMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
54 this->OutlineMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
55 this->IconMapper = vtkSmartPointer<vtkPolyDataMapper2D>::New();
56 this->EdgeActor = vtkSmartPointer<vtkActor>::New();
57 this->VertexActor = vtkSmartPointer<vtkActor>::New();
58 this->OutlineActor = vtkSmartPointer<vtkActor>::New();
59 this->IconActor = vtkSmartPointer<vtkTexturedActor2D>::New();
60 this->VertexLookupTable = vtkLookupTableWithEnabling::New();
61 this->EdgeLookupTable = vtkLookupTableWithEnabling::New();
62 this->VertexColorArrayNameInternal = nullptr;
63 this->EdgeColorArrayNameInternal = nullptr;
64 this->EnabledEdgesArrayName = nullptr;
65 this->EnabledVerticesArrayName = nullptr;
66 this->VertexPointSize = 5;
67 this->EdgeLineWidth = 1;
68 this->ScaledGlyphs = false;
69 this->ScalingArrayName = nullptr;
70
71 this->VertexMapper->SetScalarModeToUsePointData();
72 this->VertexMapper->SetLookupTable(this->VertexLookupTable);
73 this->VertexMapper->SetScalarVisibility(false);
74 this->VertexActor->PickableOff();
75 this->VertexActor->GetProperty()->SetPointSize(this->GetVertexPointSize());
76 this->OutlineActor->PickableOff();
77 this->OutlineActor->GetProperty()->SetPointSize(this->GetVertexPointSize() + 2);
78 this->OutlineActor->SetPosition(0, 0, -0.001);
79 this->OutlineActor->GetProperty()->SetRepresentationToWireframe();
80 this->OutlineMapper->SetScalarVisibility(false);
81 this->EdgeMapper->SetScalarModeToUseCellData();
82 this->EdgeMapper->SetLookupTable(this->EdgeLookupTable);
83 this->EdgeMapper->SetScalarVisibility(false);
84 this->EdgeActor->SetPosition(0, 0, -0.003);
85 this->EdgeActor->GetProperty()->SetLineWidth(this->GetEdgeLineWidth());
86
87 this->IconTransform->SetInputCoordinateSystemToWorld();
88 this->IconTransform->SetOutputCoordinateSystemToDisplay();
89 this->IconTransform->SetInputConnection(this->VertexGlyph->GetOutputPort());
90
91 this->IconTypeToIndex->SetInputConnection(this->IconTransform->GetOutputPort());
92 this->IconTypeToIndex->SetFieldType(vtkMapArrayValues::POINT_DATA);
93 this->IconTypeToIndex->SetOutputArrayType(VTK_INT);
94 this->IconTypeToIndex->SetPassArray(0);
95 this->IconTypeToIndex->SetFillValue(-1);
96
97 this->IconGlyph->SetInputConnection(this->IconTypeToIndex->GetOutputPort());
98 this->IconGlyph->SetUseIconSize(true);
99 this->IconMapper->SetInputConnection(this->IconGlyph->GetOutputPort());
100 this->IconMapper->ScalarVisibilityOff();

Callers

nothing calls this directly

Calls 15

ColorVerticesOffMethod · 0.95
SetEdgeColorArrayNameMethod · 0.95
ColorEdgesOffMethod · 0.95
NewFunction · 0.70
SetLookupTableMethod · 0.45
SetPointSizeMethod · 0.45
GetPropertyMethod · 0.45
SetPositionMethod · 0.45
SetLineWidthMethod · 0.45
SetInputConnectionMethod · 0.45
GetOutputPortMethod · 0.45

Tested by

no test coverage detected