distanceTo method

  1. @override
double distanceTo(
  1. Vector3 point
)
override

Distance from point to the boundary surface in world units, 0 when point is inside.

Implementation

@override
double distanceTo(Vector3 point) {
  final d = (point - center).length - radius;
  return d > 0 ? d : 0.0;
}