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

Method InternalInsertNextCell

Common/DataModel/vtkUnstructuredGrid.cxx:479–501  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Insert/create cell in object by type and list of point ids defining cell topology. Using a special input format, this function also support polyhedron cells.

Source from the content-addressed store, hash-verified

477// cell topology. Using a special input format, this function also support
478// polyhedron cells.
479vtkIdType vtkUnstructuredGrid::InternalInsertNextCell(int type, vtkIdList* ptIds)
480{
481 if (type == VTK_POLYHEDRON)
482 {
483 // For polyhedron cell, input ptIds is of format:
484 // (numCellFaces, numFace0Pts, id1, id2, id3, numFace1Pts,id1, id2, id3, ...)
485 vtkIdType* dataPtr = ptIds->GetPointer(0);
486 return this->InsertNextCell(type, dataPtr[0], dataPtr + 1);
487 }
488
489 this->Connectivity->InsertNextCell(ptIds);
490
491 // If faces have been created, we need to pad them (we are not creating
492 // a polyhedral cell in this method)
493 if (this->FaceLocations)
494 {
495 this->FaceLocations->InsertNextCell(0);
496 }
497
498 // insert cell type
499 double val = static_cast<double>(type);
500 return this->Types->InsertNextTuple(&val);
501}
502
503//------------------------------------------------------------------------------
504// Insert/create cell in object by type and list of point ids defining

Callers 1

InsertNextCellMethod · 0.80

Calls 9

AllocateEstimateMethod · 0.80
InsertCellPointMethod · 0.80
NewFunction · 0.50
GetPointerMethod · 0.45
InsertNextCellMethod · 0.45
InsertNextTupleMethod · 0.45
GetSizeMethod · 0.45
GetNumberOfCellsMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected