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

Method IntersectsSphere2

Common/DataModel/vtkKdNode.cxx:595–613  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

593
594//------------------------------------------------------------------------------
595int vtkKdNode::IntersectsSphere2(
596 double x, double y, double z, double rSquared, int useDataBounds = 0)
597{
598 vtkTypeBool center = this->ContainsPoint(x, y, z, useDataBounds);
599
600 if (center)
601 {
602 return 1;
603 }
604
605 double dist2 = this->GetDistance2ToBoundary(x, y, z, useDataBounds);
606
607 if (dist2 < rSquared)
608 {
609 return 1;
610 }
611
612 return 0;
613}
614
615//------------------------------------------------------------------------------
616int vtkKdNode::ContainsBox(

Callers 2

Calls 2

ContainsPointMethod · 0.95

Tested by

no test coverage detected