| 1218 | // use all the points in the points list (pts). |
| 1219 | template <class TLinks> |
| 1220 | inline void GetCellEdgeNeighborsImpl( |
| 1221 | TLinks* links, vtkIdType cellId, vtkIdType p1, vtkIdType p2, vtkIdList* cellIds) |
| 1222 | { |
| 1223 | const vtkIdType nCells1 = links->GetNcells(p1); |
| 1224 | const vtkIdType* cells1 = links->GetCells(p1); |
| 1225 | const vtkIdType nCells2 = links->GetNcells(p2); |
| 1226 | const vtkIdType* cells2 = links->GetCells(p2); |
| 1227 | |
| 1228 | for (vtkIdType i = 0; i < nCells1; ++i) |
| 1229 | { |
| 1230 | if (cells1[i] != cellId) |
| 1231 | { |
| 1232 | for (vtkIdType j = 0; j < nCells2; ++j) |
| 1233 | { |
| 1234 | if (cells1[i] == cells2[j]) |
| 1235 | { |
| 1236 | // For degenerate cells, the same cells are linked several times to the degenerate |
| 1237 | // point. So InsertUniqueId is used to prevent duplicates. This is not impacting |
| 1238 | // performances compared to InsertNextId, because most of the time, cellIds is empty. |
| 1239 | cellIds->InsertUniqueId(cells1[i]); |
| 1240 | break; |
| 1241 | } |
| 1242 | } |
| 1243 | } |
| 1244 | } |
| 1245 | } |
| 1246 | } // end anonymous namespace |
| 1247 | |
| 1248 | //------------------------------------------------------------------------------ |
nothing calls this directly
no test coverage detected