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

Method GetLength2

Common/DataModel/vtkDataSet.cxx:300–317  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Return the squared length of the diagonal of the bounding box.

Source from the content-addressed store, hash-verified

298//------------------------------------------------------------------------------
299// Return the squared length of the diagonal of the bounding box.
300double vtkDataSet::GetLength2()
301{
302 if (this->GetNumberOfPoints() == 0)
303 {
304 return 0;
305 }
306
307 double diff, l = 0.0;
308 int i;
309
310 this->ComputeBounds();
311 for (i = 0; i < 3; i++)
312 {
313 diff = this->Bounds[2 * i + 1] - this->Bounds[2 * i];
314 l += diff * diff;
315 }
316 return l;
317}
318
319//------------------------------------------------------------------------------
320vtkMTimeType vtkDataSet::GetMTime()

Callers 1

GetLengthMethod · 0.95

Calls 2

ComputeBoundsMethod · 0.95
GetNumberOfPointsMethod · 0.45

Tested by

no test coverage detected