------------------------------------------------------------------------------
| 215 | |
| 216 | //------------------------------------------------------------------------------ |
| 217 | vtkIdList* vtkStructuredGridConnectivity::GetNeighbors(int gridID, int* extents) |
| 218 | { |
| 219 | assert("pre: input extents array is nullptr" && (extents != nullptr)); |
| 220 | |
| 221 | int N = this->GetNumberOfNeighbors(gridID); |
| 222 | if (N < 1) |
| 223 | { |
| 224 | return nullptr; |
| 225 | } |
| 226 | |
| 227 | vtkIdList* neiList = vtkIdList::New(); |
| 228 | neiList->SetNumberOfIds(N); |
| 229 | |
| 230 | unsigned int nei = 0; |
| 231 | for (; nei < this->Neighbors[gridID].size(); ++nei) |
| 232 | { |
| 233 | vtkIdType neiId = this->Neighbors[gridID][nei].NeighborID; |
| 234 | neiList->SetId(nei, neiId); |
| 235 | for (int i = 0; i < 6; ++i) |
| 236 | { |
| 237 | extents[nei * 6 + i] = this->Neighbors[gridID][nei].OverlapExtent[i]; |
| 238 | } |
| 239 | } // END for all neighbors |
| 240 | |
| 241 | assert("post: N==neiList.size()" && (N == neiList->GetNumberOfIds())); |
| 242 | return (neiList); |
| 243 | } |
| 244 | |
| 245 | //------------------------------------------------------------------------------ |
| 246 | void vtkStructuredGridConnectivity::ComputeNeighbors() |
nothing calls this directly
no test coverage detected