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

Method GetZTranslation

Filters/Geometry/vtkProjectSphereFilter.cxx:433–444  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

431
432//------------------------------------------------------------------------------
433double vtkProjectSphereFilter::GetZTranslation(vtkPointSet* input)
434{
435 double maxRadius2 = 0; // squared radius
436 double coord[3];
437 for (vtkIdType i = 0; i < input->GetNumberOfPoints(); i++)
438 {
439 input->GetPoint(i, coord);
440 double dist2 = vtkMath::Distance2BetweenPoints(coord, this->Center);
441 maxRadius2 = std::max(dist2, maxRadius2);
442 }
443 return sqrt(maxRadius2);
444}
445
446//------------------------------------------------------------------------------
447void vtkProjectSphereFilter::SplitCell(vtkPointSet* input, vtkPointSet* output,

Callers 1

Calls 4

maxFunction · 0.50
sqrtFunction · 0.50
GetNumberOfPointsMethod · 0.45
GetPointMethod · 0.45

Tested by

no test coverage detected