------------------------------------------------------------------------------
| 56 | |
| 57 | //------------------------------------------------------------------------------ |
| 58 | unsigned char vtkPolyData::GetCell(vtkIdType cellId, vtkIdType const*& cell) |
| 59 | { |
| 60 | vtkIdType npts; |
| 61 | const vtkIdType* pts; |
| 62 | const auto type = this->GetCellPoints(cellId, npts, pts); |
| 63 | |
| 64 | if (type == VTK_EMPTY_CELL) |
| 65 | { // Cell is deleted |
| 66 | cell = nullptr; |
| 67 | } |
| 68 | else |
| 69 | { |
| 70 | this->LegacyBuffer->SetNumberOfIds(npts + 1); |
| 71 | this->LegacyBuffer->SetId(0, npts); |
| 72 | for (vtkIdType i = 0; i < npts; ++i) |
| 73 | { |
| 74 | this->LegacyBuffer->SetId(i, pts[i]); |
| 75 | } |
| 76 | |
| 77 | cell = this->LegacyBuffer->GetPointer(0); |
| 78 | } |
| 79 | |
| 80 | return type; |
| 81 | } |
| 82 | |
| 83 | //------------------------------------------------------------------------------ |
| 84 | vtkPolyData::vtkPolyData() |
no test coverage detected