Class SliceInfo

java.lang.Object
org.opentrafficsim.road.network.lane.SliceInfo

public class SliceInfo extends Object
Slice info. Can be used Lane but also the editor.

Copyright (c) 2023-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Constructor Summary

    Constructors
    Constructor
    Description
    SliceInfo(List<CrossSectionSlice> crossSectionSlices, org.djunits.value.vdouble.scalar.Length length)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    final org.djunits.value.vdouble.scalar.Length
    Retrieve the width at the begin of the parent link.
    final org.djunits.value.vdouble.scalar.Length
    Retrieve the width at the end of the parent link.
    final org.djunits.value.vdouble.scalar.Length
    getLateralBoundaryPosition(LateralDirectionality lateralDirection, double fractionalLongitudinalPosition)
    Return the lateral offset from the design line of the parent Link of the Left or Right boundary of this CrossSectionElement at the specified fractional longitudinal position.
    final org.djunits.value.vdouble.scalar.Length
    getLateralCenterPosition(double fractionalPosition)
    Retrieve the lateral offset from the Link design line at the specified longitudinal position.
    final org.djunits.value.vdouble.scalar.Length
    Retrieve the offset from the design line at the begin of the parent link.
    final org.djunits.value.vdouble.scalar.Length
    Retrieve the offset from the design line at the end of the parent link.
    final org.djunits.value.vdouble.scalar.Length
    getWidth(double fractionalPosition)
    Return the width of this CrossSectionElement at a specified fractional longitudinal position.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SliceInfo

      public SliceInfo(List<CrossSectionSlice> crossSectionSlices, org.djunits.value.vdouble.scalar.Length length)
      Constructor.
      Parameters:
      crossSectionSlices - List<CrossSectionSlice>; slices.
      length - Length; length of element for which slices are defined.
  • Method Details

    • getLateralCenterPosition

      public final org.djunits.value.vdouble.scalar.Length getLateralCenterPosition(double fractionalPosition)
      Retrieve the lateral offset from the Link design line at the specified longitudinal position.
      Parameters:
      fractionalPosition - double; fractional longitudinal position on this Lane
      Returns:
      Length; the lateralCenterPosition at the specified longitudinal position
    • getWidth

      public final org.djunits.value.vdouble.scalar.Length getWidth(double fractionalPosition)
      Return the width of this CrossSectionElement at a specified fractional longitudinal position.
      Parameters:
      fractionalPosition - double; the fractional longitudinal position
      Returns:
      Length; the width of this CrossSectionElement at the specified fractional longitudinal position.
    • getOffsetAtBegin

      public final org.djunits.value.vdouble.scalar.Length getOffsetAtBegin()
      Retrieve the offset from the design line at the begin of the parent link.
      Returns:
      Length; the offset of this CrossSectionElement at the begin of the parent link
    • getOffsetAtEnd

      public final org.djunits.value.vdouble.scalar.Length getOffsetAtEnd()
      Retrieve the offset from the design line at the end of the parent link.
      Returns:
      Length; the offset of this CrossSectionElement at the end of the parent link
    • getBeginWidth

      public final org.djunits.value.vdouble.scalar.Length getBeginWidth()
      Retrieve the width at the begin of the parent link.
      Returns:
      Length; the width of this CrossSectionElement at the begin of the parent link
    • getEndWidth

      public final org.djunits.value.vdouble.scalar.Length getEndWidth()
      Retrieve the width at the end of the parent link.
      Returns:
      Length; the width of this CrossSectionElement at the end of the parent link
    • getLateralBoundaryPosition

      public final org.djunits.value.vdouble.scalar.Length getLateralBoundaryPosition(LateralDirectionality lateralDirection, double fractionalLongitudinalPosition)
      Return the lateral offset from the design line of the parent Link of the Left or Right boundary of this CrossSectionElement at the specified fractional longitudinal position.
      Parameters:
      lateralDirection - LateralDirectionality; LEFT, or RIGHT
      fractionalLongitudinalPosition - double; ranges from 0.0 (begin of parentLink) to 1.0 (end of parentLink)
      Returns:
      Length