setSphere method

void setSphere(
  1. Sphere sphere
)

Set the AABB to enclose a sphere.

Implementation

void setSphere(Sphere sphere) {
  _min
    ..splat(-sphere.radius)
    ..add(sphere._center);
  _max
    ..splat(sphere.radius)
    ..add(sphere._center);
}