------------------------------------------------------------------------------
| 920 | |
| 921 | //------------------------------------------------------------------------------ |
| 922 | void vtkPolyData::GetPointCells(vtkIdType ptId, vtkIdList* cellIds) |
| 923 | { |
| 924 | if (!this->Links) |
| 925 | { |
| 926 | this->BuildLinks(); |
| 927 | } |
| 928 | cellIds->Reset(); |
| 929 | |
| 930 | vtkIdType numCells, *cells; |
| 931 | if (!this->Editable) |
| 932 | { |
| 933 | vtkStaticCellLinks* links = static_cast<vtkStaticCellLinks*>(this->Links.Get()); |
| 934 | numCells = links->GetNcells(ptId); |
| 935 | cells = links->GetCells(ptId); |
| 936 | } |
| 937 | else |
| 938 | { |
| 939 | vtkCellLinks* links = static_cast<vtkCellLinks*>(this->Links.Get()); |
| 940 | numCells = links->GetNcells(ptId); |
| 941 | cells = links->GetCells(ptId); |
| 942 | } |
| 943 | |
| 944 | cellIds->SetNumberOfIds(numCells); |
| 945 | for (auto i = 0; i < numCells; i++) |
| 946 | { |
| 947 | cellIds->SetId(i, cells[i]); |
| 948 | } |
| 949 | } |
| 950 | |
| 951 | //------------------------------------------------------------------------------ |
| 952 | void vtkPolyData::GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells) |
no test coverage detected