57 auto dist_compare = [&pos](std::pair<double, Utils::Vector3d>
const &res,
58 std::shared_ptr<Shapes::Shape>
const &shape) {
59 auto const &old_dist = res.first;
62 shape->calculate_dist(pos, new_dist, new_vec);
64 throw std::domain_error(
65 "Distance to Union not well-defined for given position!");
66 if (new_dist < old_dist) {
67 return std::make_pair(new_dist, new_vec);
72 std::accumulate(m_shapes.begin(), m_shapes.end(),
73 std::make_pair(std::numeric_limits<double>::infinity(),