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

Method GetCenter

Common/DataModel/vtkDataSet.cxx:271–279  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Get the center of the bounding box.

Source from the content-addressed store, hash-verified

269//------------------------------------------------------------------------------
270// Get the center of the bounding box.
271double* vtkDataSet::GetCenter()
272{
273 this->ComputeBounds();
274 for (int i = 0; i < 3; i++)
275 {
276 this->Center[i] = (this->Bounds[2 * i + 1] + this->Bounds[2 * i]) / 2.0;
277 }
278 return this->Center;
279}
280
281//------------------------------------------------------------------------------
282void vtkDataSet::GetCenter(double center[3])

Callers 3

EvaluateGradientMethod · 0.45
TestPolyhedron2Function · 0.45

Calls 1

ComputeBoundsMethod · 0.95

Tested by 1

TestPolyhedron2Function · 0.36