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

Method InsertNewEdge

Filters/HyperTree/vtkHyperTreeGridFeatureEdges.cxx:401–423  ·  view source on GitHub ↗

----------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

399
400//----------------------------------------------------------------------------------------------
401void vtkHyperTreeGridFeatureEdges::InsertNewEdge(
402 double* edgePt1, double* edgePt2, vtkPoints* outPoints, vtkCellArray* outCells, vtkIdType cellId)
403{
404 vtkIdType ptId1 = 0;
405 vtkIdType ptId2 = 0;
406
407 if (this->Locator)
408 {
409 this->Locator->InsertUniquePoint(edgePt1, ptId1);
410 this->Locator->InsertUniquePoint(edgePt2, ptId2);
411 }
412 else
413 {
414 ptId1 = outPoints->InsertNextPoint(edgePt1);
415 ptId2 = outPoints->InsertNextPoint(edgePt2);
416 }
417
418 std::vector<vtkIdType> outPointIds = { ptId1, ptId2 };
419
420 vtkIdType outputCellIndex = outCells->InsertNextCell(outPointIds.size(), outPointIds.data());
421
422 this->OutData->CopyData(this->InData, cellId, outputCellIndex);
423}
424
425VTK_ABI_NAMESPACE_END

Calls 6

InsertUniquePointMethod · 0.45
InsertNextPointMethod · 0.45
InsertNextCellMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
CopyDataMethod · 0.45

Tested by

no test coverage detected