setSphere method

void setSphere (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);
}