@@ -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-
275241Mesh3D 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