void visit_abstract(const AbstractAirspace &as) { assert(!m_intersections.empty()); GeoPoint point = m_intersections[0].first; RouteLink l = rpolar.generate_intermediate(link.first, RoutePoint(proj.project(point), link.second.altitude), proj); if ((l.second.altitude< (short)as.get_base().Altitude) || (l.second.altitude> (short)as.get_top().Altitude)) return; if (negative(min_distance) || (l.d < min_distance)) { min_distance = l.d; nearest = std::make_pair(&as, l.second); } }
bool AirspacePredicateHeightRange::check_height(const AbstractAirspace& t) const { return (int)t.get_top().Altitude >= h_min && (int)t.get_base().Altitude <= h_max; }