Пример #1
0
Sphere3D get_enclosing_sphere(const Vector3Ds &vs) {
  Sphere3Ds ss(vs.size());
  for (unsigned int i = 0; i < vs.size(); ++i) {
    ss[i] = Sphere3D(vs[i], 0);
  }
  return get_enclosing_sphere(ss);
}
Пример #2
0
void set_enclosing_sphere(XYZR out, const XYZs &v, double slack) {
  algebra::Sphere3D s = get_enclosing_sphere(v);
  algebra::Sphere3D s2(s.get_center(), s.get_radius() + slack);
  out.set_sphere(s2);
}