Skip to content
Snippets Groups Projects
Commit d6a79082 authored by Qiang Lu's avatar Qiang Lu Committed by Martins Mozeiko
Browse files

Combine code for LinkSegments in OpenDRIVE map exporter

parent 929f6c89
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
......@@ -11,7 +11,13 @@ using HD = apollo.hdmap;
namespace Simulator.Map
{
public class MapLane : MapDataPoints
public interface IMapLaneLineCommon<T> where T : IMapLaneLineCommon<T>
{
List<T> befores { get; set; }
List<T> afters { get; set; }
}
public class MapLane : MapDataPoints, IMapLaneLineCommon<MapLane>
{
public bool displayLane = false;
public bool isSelfReverseLane = false;
......@@ -19,10 +25,8 @@ namespace Simulator.Map
public float displayLaneWidth = 3.7f; // apollo default lane width
[System.NonSerialized]
public List<MapLane> befores = new List<MapLane>();
[System.NonSerialized]
public List<MapLane> afters = new List<MapLane>();
public List<MapLane> befores { get; set; } = new List<MapLane>();
public List<MapLane> afters { get; set; } = new List<MapLane>();
[System.NonSerialized]
public string id = null; // TODO move to mapdata?
......
......@@ -12,7 +12,7 @@ using Simulator.Map;
namespace Simulator.Map
{
public class MapLine : MapDataPoints
public class MapLine : MapDataPoints, IMapLaneLineCommon<MapLine>
{
public LineType lineType;
......@@ -20,10 +20,8 @@ namespace Simulator.Map
public MapSign stopSign;
public SignalLightStateType currentState = SignalLightStateType.Yellow;
[System.NonSerialized]
public List<MapLine> befores = new List<MapLine>();
[System.NonSerialized]
public List<MapLine> afters = new List<MapLine>();
public List<MapLine> befores { get; set; } = new List<MapLine>();
public List<MapLine> afters { get; set; } = new List<MapLine>();
[System.NonSerialized]
public List<MapSignal> signals = new List<MapSignal>();
[System.NonSerialized]
......
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