------------------------------------------------------------------------------
| 944 | |
| 945 | //------------------------------------------------------------------------------ |
| 946 | void 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 | //------------------------------------------------------------------------------ |
| 976 | void vtkUnstructuredGrid::GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells) |
no test coverage detected