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

Method AddBounds

Common/DataModel/vtkBoundingBox.cxx:63–85  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

61
62//------------------------------------------------------------------------------
63void vtkBoundingBox::AddBounds(const double bounds[6])
64{
65 bool this_valid = (this->IsValid() != 0);
66 bool other_valid = (vtkBoundingBox::IsValid(bounds) != 0);
67
68 if (!other_valid)
69 {
70 return;
71 }
72
73 if (other_valid && !this_valid)
74 {
75 this->SetBounds(bounds);
76 return;
77 }
78
79 this->MinPnt[0] = std::min(bounds[0], this->MinPnt[0]);
80 this->MaxPnt[0] = std::max(bounds[1], this->MaxPnt[0]);
81 this->MinPnt[1] = std::min(bounds[2], this->MinPnt[1]);
82 this->MaxPnt[1] = std::max(bounds[3], this->MaxPnt[1]);
83 this->MinPnt[2] = std::min(bounds[4], this->MinPnt[2]);
84 this->MaxPnt[2] = std::max(bounds[5], this->MaxPnt[2]);
85}
86
87//------------------------------------------------------------------------------
88void vtkBoundingBox::SetBounds(

Callers 1

AddBoxMethod · 0.95

Calls 5

IsValidMethod · 0.95
SetBoundsMethod · 0.95
IsValidFunction · 0.50
minFunction · 0.50
maxFunction · 0.50

Tested by

no test coverage detected