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

Method InsertNextLinkedCell

Common/DataModel/vtkPolyData.cxx:1139–1153  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Add a new cell to the cell data structure (after cell pointers have been built). This method adds the cell and then updates the links from the points to the cells. (Memory is allocated as necessary.)

Source from the content-addressed store, hash-verified

1137// built). This method adds the cell and then updates the links from the points
1138// to the cells. (Memory is allocated as necessary.)
1139vtkIdType vtkPolyData::InsertNextLinkedCell(int type, int npts, const vtkIdType pts[])
1140{
1141 vtkIdType i, id;
1142
1143 id = this->InsertNextCell(type, npts, pts);
1144
1145 vtkCellLinks* links = static_cast<vtkCellLinks*>(this->Links.Get());
1146 for (i = 0; i < npts; i++)
1147 {
1148 links->ResizeCellList(pts[i], 1);
1149 links->AddCellReference(id, pts[i]);
1150 }
1151
1152 return id;
1153}
1154
1155//------------------------------------------------------------------------------
1156// Remove a reference to a cell in a particular point's link list. You may also

Callers 2

RequestDataMethod · 0.45

Calls 4

InsertNextCellMethod · 0.95
GetMethod · 0.45
ResizeCellListMethod · 0.45
AddCellReferenceMethod · 0.45

Tested by

no test coverage detected