------------------------------------------------------------------------------
| 879 | |
| 880 | //------------------------------------------------------------------------------ |
| 881 | void vtkGraph::GetEdgePoints(vtkIdType e, vtkIdType& npts, double*& pts) |
| 882 | { |
| 883 | if (vtkDistributedGraphHelper* helper = this->GetDistributedGraphHelper()) |
| 884 | { |
| 885 | int myRank = this->Information->Get(vtkDataObject::DATA_PIECE_NUMBER()); |
| 886 | if (myRank != helper->GetEdgeOwner(e)) |
| 887 | { |
| 888 | vtkErrorMacro("vtkGraph cannot retrieve edge points for a non-local vertex"); |
| 889 | return; |
| 890 | } |
| 891 | |
| 892 | e = helper->GetEdgeIndex(e); |
| 893 | } |
| 894 | |
| 895 | if (e < 0 || e > this->Internals->NumberOfEdges) |
| 896 | { |
| 897 | vtkErrorMacro("Invalid edge id."); |
| 898 | return; |
| 899 | } |
| 900 | if (!this->EdgePoints) |
| 901 | { |
| 902 | npts = 0; |
| 903 | pts = nullptr; |
| 904 | return; |
| 905 | } |
| 906 | std::vector<std::vector<double>>::size_type numEdges = this->Internals->NumberOfEdges; |
| 907 | if (this->EdgePoints->Storage.size() < numEdges) |
| 908 | { |
| 909 | this->EdgePoints->Storage.resize(numEdges); |
| 910 | } |
| 911 | npts = static_cast<vtkIdType>(this->EdgePoints->Storage[e].size() / 3); |
| 912 | if (npts > 0) |
| 913 | { |
| 914 | pts = this->EdgePoints->Storage[e].data(); |
| 915 | } |
| 916 | else |
| 917 | { |
| 918 | pts = nullptr; |
| 919 | } |
| 920 | } |
| 921 | |
| 922 | //------------------------------------------------------------------------------ |
| 923 | vtkIdType vtkGraph::GetNumberOfEdgePoints(vtkIdType e) |
nothing calls this directly
no test coverage detected