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

Method Shrink

Common/DataModel/vtkAMRBox.cxx:712–727  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

710
711//------------------------------------------------------------------------------
712void vtkAMRBox::Shrink(int byN)
713{
714 assert("pre: AMR Box instance is invalid" && !this->IsInvalid());
715 // TODO: One question here is, should we allow negative indices?
716 // Or should we otherwise, ensure that the box is grown with
717 // bounds.
718 for (int q = 0; q < 3; ++q)
719 {
720 if (!this->EmptyDimension(q))
721 {
722 this->LoCorner[q] += byN;
723 this->HiCorner[q] -= byN;
724 }
725 }
726 assert("post: Grown AMR Box instance is invalid" && !this->IsInvalid());
727}
728
729//------------------------------------------------------------------------------
730int vtkAMRBox::InitializeGrid(vtkUniformGrid* grid, double* origin, double* spacing) const

Callers 3

ShrinkImplFunction · 0.45
TestAMRBoxIntersectionFunction · 0.45

Calls 1

assertFunction · 0.50

Tested by 2

TestAMRBoxIntersectionFunction · 0.36