------------------------------------------------------------------------------ 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.
| 1271 | // to the cells. (Memory is allocated as necessary.) Note that the dataset must |
| 1272 | // be in "Editable" mode. |
| 1273 | vtkIdType 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 | //------------------------------------------------------------------------------ |
| 1290 | void vtkUnstructuredGrid::ReportReferences(vtkGarbageCollector* collector) |
nothing calls this directly
no test coverage detected