using MultiWheelC.TrajectoryPlanning.CoarsePath; namespace MultiWheelC.TrajectoryPlanning.PathSmoothing; /// 平滑路径中方向一致的连续点范围;起止索引均包含在内。 public sealed class SmoothedPathSegment { /// 创建覆盖平滑路径连续索引范围的方向段。 /// 从零开始的方向段编号。 /// 该段实际行驶方向。 /// 该段首点在完整平滑路径中的包含式索引。 /// 该段末点在完整平滑路径中的包含式索引。 /// 是否从换向后保留的新方向点开始。 /// 是否在紧邻下一方向段的换向对之前结束。 public SmoothedPathSegment( int segmentIndex, TravelDirection direction, int startIndex, int endIndex, bool startsAtGearSwitch, bool endsAtGearSwitch) { SegmentIndex = segmentIndex; Direction = direction; StartIndex = startIndex; EndIndex = endIndex; StartsAtGearSwitch = startsAtGearSwitch; EndsAtGearSwitch = endsAtGearSwitch; } /// 从零开始的分段序号。 public int SegmentIndex { get; } /// 本段行驶方向。 public TravelDirection Direction { get; } /// 本段在平滑路径中的起始包含式索引。 public int StartIndex { get; } /// 本段在平滑路径中的结束包含式索引。 public int EndIndex { get; } /// 本段首点是否为换向后保留的新方向点。 public bool StartsAtGearSwitch { get; } /// 本段末点是否紧邻下一方向段的换向对。 public bool EndsAtGearSwitch { get; } }