------------------------------------------------------------------------------
| 72 | |
| 73 | //------------------------------------------------------------------------------ |
| 74 | void vtkUnstructuredGridCellIterator::SetUnstructuredGrid(vtkUnstructuredGrid* ug) |
| 75 | { |
| 76 | // If the unstructured grid has not been initialized yet, these may not exist: |
| 77 | vtkDataArray* cellTypeArray = ug ? ug->GetCellTypes() : nullptr; |
| 78 | vtkCellArray* cellArray = ug ? ug->GetCells() : nullptr; |
| 79 | vtkPoints* points = ug ? ug->GetPoints() : nullptr; |
| 80 | |
| 81 | if (points) |
| 82 | { |
| 83 | this->Points->SetDataType(points->GetDataType()); |
| 84 | } |
| 85 | |
| 86 | if (ug && cellTypeArray && cellArray && points) |
| 87 | { |
| 88 | this->Cells = vtk::TakeSmartPointer(cellArray->NewIterator()); |
| 89 | this->Cells->GoToFirstCell(); |
| 90 | |
| 91 | this->Types = cellTypeArray; |
| 92 | this->PolyFaceConn = ug->GetPolyhedronFaces(); |
| 93 | this->PolyFaceLocs = ug->GetPolyhedronFaceLocations(); |
| 94 | this->Coords = points; |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | //------------------------------------------------------------------------------ |
| 99 | bool vtkUnstructuredGridCellIterator::IsDoneWithTraversal() |