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

Method GetCell

Common/DataModel/vtkPolyData.cxx:58–81  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

56
57//------------------------------------------------------------------------------
58unsigned 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//------------------------------------------------------------------------------
84vtkPolyData::vtkPolyData()

Callers 3

CopyCellsMethod · 0.45
RemoveDeletedCellsMethod · 0.45

Calls 13

GetCellPointsMethod · 0.95
BuildCellsMethod · 0.95
GetCellArrayInternalMethod · 0.95
SetNumberOfIdsMethod · 0.80
GetTagMethod · 0.80
assertFunction · 0.50
SetIdMethod · 0.45
GetPointerMethod · 0.45
GetCellTypeMethod · 0.45
SetCellTypeMethod · 0.45
GetCellAtIdMethod · 0.45
GetCellIdMethod · 0.45

Tested by

no test coverage detected