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