Skip to content

Commit 4b24a1e

Browse files
committed
refactor: remove unused Road::get_lane_border_line
1 parent b2baf34 commit 4b24a1e

2 files changed

Lines changed: 0 additions & 37 deletions

File tree

include/libodr/Road.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ class Road
9797
get_xyz(double s, double t, double h, Vec3D* e_s = nullptr, Vec3D* e_t = nullptr, Vec3D* e_h = nullptr, bool allow_extrapolate = true) const;
9898
Vec3D get_surface_pt(double s, double t, Vec3D* vn = nullptr, bool allow_extrapolate = true) const;
9999

100-
Line3D get_lane_border_line(const LaneKey& lane_key, double s_start, double s_end, double eps, bool outer = true) const;
101-
Line3D get_lane_border_line(const LaneKey& lane_key, double eps, bool outer = true) const;
102-
103100
Mesh3D get_lane_mesh(const LaneKey& lane_key, double s_start, double s_end, double eps, std::vector<uint32_t>* outline_indices = nullptr) const;
104101
Mesh3D get_lane_mesh(const LaneKey& lane_key, double eps, std::vector<uint32_t>* outline_indices = nullptr) const;
105102

src/Road.cpp

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -238,40 +238,6 @@ std::set<double> Road::approximate_lane_border_linear(const LaneKey& lane_key, d
238238
return this->approximate_lane_border_linear(lane_key, lanesection.s, s_end_lane_section, eps, outer);
239239
}
240240

241-
Line3D Road::get_lane_border_line(const LaneKey& lane_key, double s_start, double s_end, double eps, bool outer) const
242-
{
243-
const LaneSection& lanesection = this->s_to_lane_section.at(lane_key.lane_section_s);
244-
const Lane& lane = lanesection.id_to_lane.at(lane_key.lane_id);
245-
246-
std::set<double> s_samples = this->approximate_lane_border_linear(lane_key, s_start, s_end, eps, outer);
247-
248-
const Lane& border_lane = outer ? lane : lanesection.id_to_lane.at(next_towards_zero(lane.id));
249-
250-
Line3D border_line;
251-
for (const double s : s_samples)
252-
{
253-
const std::optional<double> t_opt = border_lane.outer_border.evaluate(s);
254-
require_or_throw(t_opt.has_value() || border_lane.id == 0, "lane {} has no outer border at s {}", border_lane.id, s);
255-
double t = t_opt.value_or(0.0);
256-
if (!outer)
257-
{
258-
const std::optional<double> t_lane_outer_border = lane.outer_border.evaluate(s);
259-
require_or_throw(t_lane_outer_border.has_value() || lane.id == 0, "lane {} has no outer border at s {}", lane.id, s);
260-
t = std::nextafter(t, t_lane_outer_border.value_or(0.0)); // ensure t is not on lane boundary but within lane
261-
}
262-
border_line.push_back(this->get_surface_pt(s, t));
263-
}
264-
265-
return border_line;
266-
}
267-
268-
Line3D Road::get_lane_border_line(const LaneKey& lane_key, double eps, bool outer) const
269-
{
270-
const LaneSection& lanesection = this->s_to_lane_section.at(lane_key.lane_section_s);
271-
const double s_end_lane_section = this->get_lanesection_end(lanesection);
272-
return this->get_lane_border_line(lane_key, lanesection.s, s_end_lane_section, eps, outer);
273-
}
274-
275241
Mesh3D Road::get_lane_mesh(const LaneKey& lane_key, double s_start, double s_end, double eps, std::vector<uint32_t>* outline_indices) const
276242
{
277243
const LaneSection& lanesection = this->s_to_lane_section.at(lane_key.lane_section_s);

0 commit comments

Comments
 (0)