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

Method IntersectBoxAlongDimension

Common/DataModel/vtkAMRBox.cxx:280–300  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

278
279//------------------------------------------------------------------------------
280bool vtkAMRBox::IntersectBoxAlongDimension(const vtkAMRBox& other, int q)
281{
282 assert("pre: dimension is out-of-bounds!" && (q >= 0) && (q <= 2));
283 bool e1 = this->EmptyDimension(q);
284 bool e2 = other.EmptyDimension(q);
285 if (e1 && e2)
286 {
287 return true;
288 }
289 if (e1 || e2)
290 {
291 return false;
292 }
293 this->LoCorner[q] = std::max(this->LoCorner[q], other.LoCorner[q]);
294 this->HiCorner[q] = std::min(this->HiCorner[q], other.HiCorner[q]);
295 if (this->LoCorner[q] > this->HiCorner[q])
296 {
297 return false;
298 }
299 return true;
300}
301
302bool vtkAMRBox::Intersect(const vtkAMRBox& other)
303{

Callers 1

IntersectMethod · 0.95

Calls 3

assertFunction · 0.50
maxFunction · 0.50
minFunction · 0.50

Tested by

no test coverage detected