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

Method SetUnstructuredGrid

Common/DataModel/vtkUnstructuredGridCellIterator.cxx:74–96  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

72
73//------------------------------------------------------------------------------
74void 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//------------------------------------------------------------------------------
99bool vtkUnstructuredGridCellIterator::IsDoneWithTraversal()

Callers 4

NewCellIteratorMethod · 0.80
~vtkMergeCellsMethod · 0.80
TestMergeCellsFunction · 0.80
MergeGridsMethod · 0.80

Calls 8

GetCellTypesMethod · 0.45
GetCellsMethod · 0.45
GetPointsMethod · 0.45
SetDataTypeMethod · 0.45
GetDataTypeMethod · 0.45
NewIteratorMethod · 0.45
GetPolyhedronFacesMethod · 0.45

Tested by 1

TestMergeCellsFunction · 0.64