------------------------------------------------------------------------------ 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.
| 477 | // cell topology. Using a special input format, this function also support |
| 478 | // polyhedron cells. |
| 479 | vtkIdType 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 |
no test coverage detected