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

Method BuildLinks

Common/DataModel/vtkUnstructuredGrid.cxx:946–973  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

944
945//------------------------------------------------------------------------------
946void vtkUnstructuredGrid::BuildLinks()
947{
948 if (!this->Points)
949 {
950 return;
951 }
952 // Create appropriate links. Currently, it's either a vtkCellLinks (when
953 // the dataset is editable) or vtkStaticCellLinks (when the dataset is
954 // not editable).
955 if (!this->Links)
956 {
957 if (!this->Editable)
958 {
959 this->Links = vtkSmartPointer<vtkStaticCellLinks>::New();
960 }
961 else
962 {
963 this->Links = vtkSmartPointer<vtkCellLinks>::New();
964 static_cast<vtkCellLinks*>(this->Links.Get())->Allocate(this->GetNumberOfPoints());
965 }
966 this->Links->SetDataSet(this);
967 }
968 else if (this->Points->GetMTime() > this->Links->GetMTime())
969 {
970 this->Links->SetDataSet(this);
971 }
972 this->Links->BuildLinks();
973}
974
975//------------------------------------------------------------------------------
976void vtkUnstructuredGrid::GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)

Callers 3

GetPointCellsMethod · 0.95
IsCellBoundaryMethod · 0.95
GetCellNeighborsMethod · 0.95

Calls 6

NewFunction · 0.50
AllocateMethod · 0.45
GetMethod · 0.45
GetNumberOfPointsMethod · 0.45
SetDataSetMethod · 0.45
GetMTimeMethod · 0.45

Tested by

no test coverage detected