------------------------------------------------------------------------------
| 161 | |
| 162 | //------------------------------------------------------------------------------ |
| 163 | void vtkExplicitStructuredGrid::GetPointCells(vtkIdType ptId, vtkIdList* cellIds) |
| 164 | { |
| 165 | if (!this->Links) |
| 166 | { |
| 167 | this->BuildLinks(); |
| 168 | } |
| 169 | cellIds->Reset(); |
| 170 | |
| 171 | // Use the correct cell links. Use an explicit cast for performance reasons |
| 172 | // (virtuals, and templated functions were tested to be slow -- if you make |
| 173 | // changes, please make sure to measure performance impacts). |
| 174 | vtkIdType numCells, *cells; |
| 175 | if (!this->Editable) |
| 176 | { |
| 177 | vtkStaticCellLinks* links = static_cast<vtkStaticCellLinks*>(this->Links.Get()); |
| 178 | numCells = links->GetNcells(ptId); |
| 179 | cells = links->GetCells(ptId); |
| 180 | } |
| 181 | else |
| 182 | { |
| 183 | vtkCellLinks* links = static_cast<vtkCellLinks*>(this->Links.Get()); |
| 184 | numCells = links->GetNcells(ptId); |
| 185 | cells = links->GetCells(ptId); |
| 186 | } |
| 187 | |
| 188 | cellIds->SetNumberOfIds(numCells); |
| 189 | for (auto i = 0; i < numCells; i++) |
| 190 | { |
| 191 | cellIds->SetId(i, cells[i]); |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | //------------------------------------------------------------------------------ |
| 196 | vtkIdType* vtkExplicitStructuredGrid::GetCellPoints(vtkIdType cellId) |
nothing calls this directly
no test coverage detected