From d2271f81d7b49de5353b0a5a86a2f517791456cd Mon Sep 17 00:00:00 2001 From: Dong Li Date: Sun, 6 Aug 2017 20:34:58 -0700 Subject: [PATCH] remove the function is_on_road(box). * The function has no use case. * The function is misleading. --- modules/map/pnc_map/path.cc | 11 ----------- modules/map/pnc_map/path.h | 2 -- 2 files changed, 13 deletions(-) diff --git a/modules/map/pnc_map/path.cc b/modules/map/pnc_map/path.cc index 0bb689024f..bdf9b1254e 100644 --- a/modules/map/pnc_map/path.cc +++ b/modules/map/pnc_map/path.cc @@ -546,17 +546,6 @@ bool Path::is_on_path(const Vec2d& point) const { return false; } -bool Path::is_on_path(const Box2d& box) const { - std::vector corners; - box.GetAllCorners(&corners); - for (const auto& corner : corners) { - if (!is_on_path(corner)) { - return false; - } - } - return true; -} - bool Path::overlap_with(const common::math::Box2d& box, double width) const { if (_use_path_approximation) { return _approximation.overlap_with(*this, box, width); diff --git a/modules/map/pnc_map/path.h b/modules/map/pnc_map/path.h index f01c574a27..d4a7cbaef8 100644 --- a/modules/map/pnc_map/path.h +++ b/modules/map/pnc_map/path.h @@ -261,8 +261,6 @@ class Path { bool get_width(const double s, double* left_width, double* right_width) const; bool is_on_path(const common::math::Vec2d& point) const; - // requires all corners of the box on path. - bool is_on_path(const common::math::Box2d& box) const; bool overlap_with(const common::math::Box2d& box, double width) const; std::string debug_string() const; -- GitLab