------------------------------------------------------------------------------
| 1364 | |
| 1365 | //------------------------------------------------------------------------------ |
| 1366 | bool vtkStructuredAMRGridConnectivity::IsNodeWithinExtent(int i, int j, int k, int GridExtent[6]) |
| 1367 | { |
| 1368 | bool status = false; |
| 1369 | switch (this->DataDescription) |
| 1370 | { |
| 1371 | case vtkStructuredData::VTK_STRUCTURED_X_LINE: |
| 1372 | if ((GridExtent[0] <= i) && (i <= GridExtent[1])) |
| 1373 | { |
| 1374 | status = true; |
| 1375 | } |
| 1376 | break; |
| 1377 | case vtkStructuredData::VTK_STRUCTURED_Y_LINE: |
| 1378 | if ((GridExtent[2] <= j) && (j <= GridExtent[3])) |
| 1379 | { |
| 1380 | status = true; |
| 1381 | } |
| 1382 | break; |
| 1383 | case vtkStructuredData::VTK_STRUCTURED_Z_LINE: |
| 1384 | if ((GridExtent[4] <= k) && (k <= GridExtent[5])) |
| 1385 | { |
| 1386 | status = true; |
| 1387 | } |
| 1388 | break; |
| 1389 | case vtkStructuredData::VTK_STRUCTURED_XY_PLANE: |
| 1390 | if ((GridExtent[0] <= i) && (i <= GridExtent[1]) && (GridExtent[2] <= j) && |
| 1391 | (j <= GridExtent[3])) |
| 1392 | { |
| 1393 | status = true; |
| 1394 | } |
| 1395 | break; |
| 1396 | case vtkStructuredData::VTK_STRUCTURED_YZ_PLANE: |
| 1397 | if ((GridExtent[2] <= j) && (j <= GridExtent[3]) && (GridExtent[4] <= k) && |
| 1398 | (k <= GridExtent[5])) |
| 1399 | { |
| 1400 | status = true; |
| 1401 | } |
| 1402 | break; |
| 1403 | case vtkStructuredData::VTK_STRUCTURED_XZ_PLANE: |
| 1404 | if ((GridExtent[0] <= i) && (i <= GridExtent[1]) && (GridExtent[4] <= k) && |
| 1405 | (k <= GridExtent[5])) |
| 1406 | { |
| 1407 | status = true; |
| 1408 | } |
| 1409 | break; |
| 1410 | case vtkStructuredData::VTK_STRUCTURED_XYZ_GRID: |
| 1411 | if ((GridExtent[0] <= i) && (i <= GridExtent[1]) && (GridExtent[2] <= j) && |
| 1412 | (j <= GridExtent[3]) && (GridExtent[4] <= k) && (k <= GridExtent[5])) |
| 1413 | { |
| 1414 | status = true; |
| 1415 | } |
| 1416 | break; |
| 1417 | default: |
| 1418 | std::cout << "Data description is: " << this->DataDescription << "\n"; |
| 1419 | std::cout.flush(); |
| 1420 | assert("pre: Undefined data-description!" && false); |
| 1421 | } // END switch |
| 1422 | return (status); |
| 1423 | } |
no test coverage detected