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

Method EdgePosition

Views/Infovis/vtkGraphItem.cxx:127–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127vtkVector2f vtkGraphItem::EdgePosition(vtkIdType edgeIdx, vtkIdType point)
128{
129 double* p;
130 if (point == 0)
131 {
132 vtkPoints* points = this->Graph->GetPoints();
133 p = points->GetPoint(this->Graph->GetSourceVertex(edgeIdx));
134 }
135 else if (point == this->NumberOfEdgePoints(edgeIdx) - 1)
136 {
137 vtkPoints* points = this->Graph->GetPoints();
138 p = points->GetPoint(this->Graph->GetTargetVertex(edgeIdx));
139 }
140 else
141 {
142 p = this->Graph->GetEdgePoint(edgeIdx, point - 1);
143 }
144 return vtkVector2f(static_cast<float>(p[0]), static_cast<float>(p[1]));
145}
146
147float vtkGraphItem::EdgeWidth(vtkIdType vtkNotUsed(line), vtkIdType vtkNotUsed(point))
148{

Callers 1

RebuildBuffersMethod · 0.95

Calls 7

NumberOfEdgePointsMethod · 0.95
GetSourceVertexMethod · 0.80
GetTargetVertexMethod · 0.80
GetEdgePointMethod · 0.80
vtkVector2fClass · 0.50
GetPointsMethod · 0.45
GetPointMethod · 0.45

Tested by

no test coverage detected