Skip to content
Snippets Groups Projects
Commit f7f6c33b authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Solved a bug: In the add_nodes() function: the width attribute is used instead...

Solved a bug: In the add_nodes() function: the width attribute is used instead og the get_width() function to get the actual width (not scaled by the scale_factor).
parent cc472a2a
No related branches found
No related tags found
No related merge requests found
...@@ -207,7 +207,7 @@ void COpendriveRoadSegment::add_nodes(OpenDRIVE::road_type &road_info) ...@@ -207,7 +207,7 @@ void COpendriveRoadSegment::add_nodes(OpenDRIVE::road_type &road_info)
new_node->set_parent_segment(this); new_node->set_parent_segment(this);
} }
this->lanes[i]->add_node(new_node); this->lanes[i]->add_node(new_node);
lane_offset-=this->lanes[i]->get_width(); lane_offset-=this->lanes[i]->width;
} }
} }
} }
...@@ -238,7 +238,7 @@ void COpendriveRoadSegment::add_nodes(OpenDRIVE::road_type &road_info) ...@@ -238,7 +238,7 @@ void COpendriveRoadSegment::add_nodes(OpenDRIVE::road_type &road_info)
new_node->set_parent_segment(this); new_node->set_parent_segment(this);
} }
this->lanes[i]->add_node(new_node); this->lanes[i]->add_node(new_node);
lane_offset+=this->lanes[i]->get_width(); lane_offset+=this->lanes[i]->width;
} }
} }
} }
...@@ -301,12 +301,14 @@ void COpendriveRoadSegment::link_neightbour_lanes(lanes::laneSection_type &lane_ ...@@ -301,12 +301,14 @@ void COpendriveRoadSegment::link_neightbour_lanes(lanes::laneSection_type &lane_
else else
this->lanes[i]->right_mark=OD_MARK_NONE; this->lanes[i]->right_mark=OD_MARK_NONE;
} }
/*
if(this->lanes.find(1)!=this->lanes.end() && this->lanes.find(-1)!=this->lanes.end()) if(this->lanes.find(1)!=this->lanes.end() && this->lanes.find(-1)!=this->lanes.end())
{ {
this->lanes[-1]->left_mark=center_mark; this->lanes[-1]->left_mark=center_mark;
this->lanes[1]->right_mark=center_mark; this->lanes[1]->right_mark=center_mark;
this->lanes[-1]->link_neightbour_lane(this->lanes[1]); this->lanes[-1]->link_neightbour_lane(this->lanes[1]);
} }
*/
} }
void COpendriveRoadSegment::link_segment(COpendriveRoadSegment &segment) void COpendriveRoadSegment::link_segment(COpendriveRoadSegment &segment)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment