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

Method GetCenter

Common/DataModel/vtkGenericDataSet.cxx:133–141  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Get the center of the bounding box in global coordinates. The return value is VOLATILE. - \post result_exists: result!=0

Source from the content-addressed store, hash-verified

131// The return value is VOLATILE.
132// - \post result_exists: result!=0
133double* vtkGenericDataSet::GetCenter()
134{
135 this->ComputeBounds();
136 for (int i = 0; i < 3; i++)
137 {
138 this->Center[i] = (this->Bounds[2 * i + 1] + this->Bounds[2 * i]) * 0.5;
139 }
140 return this->Center;
141}
142
143//------------------------------------------------------------------------------
144// Description:

Callers

nothing calls this directly

Calls 1

ComputeBoundsMethod · 0.45

Tested by

no test coverage detected