| 673 | }; |
| 674 | |
| 675 | inline void ComputeExtentsForBounds(const double origin[3], const double spacing[3], |
| 676 | const int extents[6], const double bounds[6], int result[6]) |
| 677 | { |
| 678 | for (int i = 0; i < 3; ++i) |
| 679 | { |
| 680 | if (spacing[i] == 0.0) |
| 681 | { |
| 682 | result[2 * i] = result[2 * i + 1] = 0; |
| 683 | } |
| 684 | else |
| 685 | { |
| 686 | result[2 * i] = std::max( |
| 687 | extents[2 * i], static_cast<int>(std::floor((bounds[2 * i] - origin[i]) / spacing[i]))); |
| 688 | result[2 * i + 1] = std::min(extents[2 * i + 1], |
| 689 | static_cast<int>(std::ceil((bounds[2 * i + 1] - origin[i]) / spacing[i]))); |
| 690 | } |
| 691 | } |
| 692 | } |
| 693 | |
| 694 | inline bool ComparePointsByBlockId(const Point& p1, const Point& p2) |
| 695 | { |
no test coverage detected