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

Method InsertNextLinkedCell

Common/DataModel/vtkUnstructuredGrid.cxx:1273–1287  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Add a new cell to the cell data structure (after cell links have been built). This method adds the cell and then updates the links from the points to the cells. (Memory is allocated as necessary.) Note that the dataset must be in "Editable" mode.

Source from the content-addressed store, hash-verified

1271// to the cells. (Memory is allocated as necessary.) Note that the dataset must
1272// be in "Editable" mode.
1273vtkIdType vtkUnstructuredGrid::InsertNextLinkedCell(int type, int npts, const vtkIdType pts[])
1274{
1275 vtkIdType i, id;
1276
1277 id = this->InsertNextCell(type, npts, pts);
1278
1279 vtkCellLinks* clinks = static_cast<vtkCellLinks*>(this->Links.Get());
1280 for (i = 0; i < npts; i++)
1281 {
1282 clinks->ResizeCellList(pts[i], 1);
1283 clinks->AddCellReference(id, pts[i]);
1284 }
1285
1286 return id;
1287}
1288
1289//------------------------------------------------------------------------------
1290void vtkUnstructuredGrid::ReportReferences(vtkGarbageCollector* collector)

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected