------------------------------------------------------------------------------
| 183 | |
| 184 | //------------------------------------------------------------------------------ |
| 185 | void vtkStructuredGrid::GetCellNeighbors(vtkIdType cellId, vtkIdList* ptIds, vtkIdList* cellIds) |
| 186 | { |
| 187 | int numPtIds = ptIds->GetNumberOfIds(); |
| 188 | |
| 189 | // Use special methods for speed |
| 190 | switch (numPtIds) |
| 191 | { |
| 192 | case 0: |
| 193 | cellIds->Reset(); |
| 194 | return; |
| 195 | |
| 196 | case 1: |
| 197 | case 2: |
| 198 | case 4: // vertex, edge, face neighbors |
| 199 | vtkStructuredData::GetCellNeighbors(cellId, ptIds, cellIds, this->Dimensions); |
| 200 | break; |
| 201 | |
| 202 | default: |
| 203 | this->Superclass::GetCellNeighbors(cellId, ptIds, cellIds); |
| 204 | } |
| 205 | |
| 206 | // If blanking, remove blanked cells. |
| 207 | if (this->GetPointGhostArray() || this->GetCellGhostArray()) |
| 208 | { |
| 209 | vtkIdType* pCellIds = cellIds->GetPointer(0); |
| 210 | vtkIdType* end = |
| 211 | std::remove_if(pCellIds, pCellIds + cellIds->GetNumberOfIds(), CellVisibility(this)); |
| 212 | cellIds->Resize(std::distance(pCellIds, end)); |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | //------------------------------------------------------------------------------ |
| 217 | void vtkStructuredGrid::GetCellNeighbors( |
nothing calls this directly
no test coverage detected