MCPcopy Create free account
hub / github.com/Kitware/VTK / ComputeExtentsForBounds

Function ComputeExtentsForBounds

Filters/ParallelDIY2/vtkPResampleWithDataSet.cxx:675–692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

673};
674
675inline 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
694inline bool ComparePointsByBlockId(const Point& p1, const Point& p2)
695{

Callers 1

FindPointsToSendFunction · 0.85

Calls 4

maxFunction · 0.50
floorFunction · 0.50
minFunction · 0.50
ceilFunction · 0.50

Tested by

no test coverage detected