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

Method ClearEdgePoints

Common/DataModel/vtkGraph.cxx:1034–1063  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1032
1033//------------------------------------------------------------------------------
1034void vtkGraph::ClearEdgePoints(vtkIdType e)
1035{
1036 if (vtkDistributedGraphHelper* helper = this->GetDistributedGraphHelper())
1037 {
1038 int myRank = this->Information->Get(vtkDataObject::DATA_PIECE_NUMBER());
1039 if (myRank != helper->GetEdgeOwner(e))
1040 {
1041 vtkErrorMacro("vtkGraph cannot clear edge points for a non-local vertex");
1042 return;
1043 }
1044
1045 e = helper->GetEdgeIndex(e);
1046 }
1047
1048 if (e < 0 || e > this->Internals->NumberOfEdges)
1049 {
1050 vtkErrorMacro("Invalid edge id.");
1051 return;
1052 }
1053 if (!this->EdgePoints)
1054 {
1055 this->EdgePoints = vtkGraphEdgePoints::New();
1056 }
1057 std::vector<std::vector<double>>::size_type numEdges = this->Internals->NumberOfEdges;
1058 if (this->EdgePoints->Storage.size() < numEdges)
1059 {
1060 this->EdgePoints->Storage.resize(numEdges);
1061 }
1062 this->EdgePoints->Storage[e].clear();
1063}
1064
1065//------------------------------------------------------------------------------
1066void vtkGraph::AddEdgePoint(vtkIdType e, const double x[3])

Callers 3

RequestDataMethod · 0.80
TestArcEdgesFunction · 0.80
RequestDataMethod · 0.80

Calls 8

GetEdgeOwnerMethod · 0.80
GetEdgeIndexMethod · 0.80
NewFunction · 0.50
GetMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45
clearMethod · 0.45

Tested by 1

TestArcEdgesFunction · 0.64