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

Method GetPointCells

Common/DataModel/vtkPolyData.cxx:922–949  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

920
921//------------------------------------------------------------------------------
922void vtkPolyData::GetPointCells(vtkIdType ptId, vtkIdList* cellIds)
923{
924 if (!this->Links)
925 {
926 this->BuildLinks();
927 }
928 cellIds->Reset();
929
930 vtkIdType numCells, *cells;
931 if (!this->Editable)
932 {
933 vtkStaticCellLinks* links = static_cast<vtkStaticCellLinks*>(this->Links.Get());
934 numCells = links->GetNcells(ptId);
935 cells = links->GetCells(ptId);
936 }
937 else
938 {
939 vtkCellLinks* links = static_cast<vtkCellLinks*>(this->Links.Get());
940 numCells = links->GetNcells(ptId);
941 cells = links->GetCells(ptId);
942 }
943
944 cellIds->SetNumberOfIds(numCells);
945 for (auto i = 0; i < numCells; i++)
946 {
947 cellIds->SetId(i, cells[i]);
948 }
949}
950
951//------------------------------------------------------------------------------
952void vtkPolyData::GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)

Callers 3

IsEdgeMethod · 0.95
IsTriangleMethod · 0.95

Calls 6

BuildLinksMethod · 0.95
SetNumberOfIdsMethod · 0.80
ResetMethod · 0.45
GetMethod · 0.45
GetCellsMethod · 0.45
SetIdMethod · 0.45

Tested by

no test coverage detected