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

Function SplitNodeBox

Common/DataModel/vtkCellTreeLocator.cxx:1054–1069  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1052//------------------------------------------------------------------------------
1053template <typename T>
1054void SplitNodeBox(CellTreeNode<T>* n, vtkBoundingBox& b, vtkBoundingBox& l, vtkBoundingBox& r)
1055{
1056 double minpt[3], maxpt[3];
1057 // create a box for left node
1058 vtkBoundingBox ll(b);
1059 ll.GetMaxPoint(maxpt[0], maxpt[1], maxpt[2]);
1060 maxpt[n->GetDimension()] = n->GetLeftMaxValue();
1061 ll.SetMaxPoint(maxpt[0], maxpt[1], maxpt[2]);
1062 l = ll;
1063 // create a box for right node
1064 vtkBoundingBox rr(b);
1065 rr.GetMinPoint(minpt[0], minpt[1], minpt[2]);
1066 minpt[n->GetDimension()] = n->GetRightMinValue();
1067 rr.SetMinPoint(minpt[0], minpt[1], minpt[2]);
1068 r = rr;
1069}
1070
1071//------------------------------------------------------------------------------
1072void AddBox(vtkPolyData* pd, double* bounds, int level)

Callers 2

FindCellsWithinBoundsMethod · 0.85

Calls 5

GetMaxPointMethod · 0.80
GetMinPointMethod · 0.80
SetMaxPointMethod · 0.60
SetMinPointMethod · 0.60
GetDimensionMethod · 0.45

Tested by

no test coverage detected