View Javadoc
1   package org.opentrafficsim.road.network.lane;
2   
3   import org.djunits.value.vdouble.scalar.Length;
4   
5   /**
6    * <p>
7    * Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
8    * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
9    * </p>
10   * @author <a href="https://github.com/averbraeck">Alexander Verbraeck</a>
11   * @author <a href="https://github.com/peter-knoppers">Peter Knoppers</a>
12   */
13  public abstract class RoadMarkerAcross
14  {
15      /** Cross section element for which this is a road marker. Usually this will be a Lane. */
16      private final CrossSectionElement crossSectionElement;
17  
18      /** Longitudinal position on the cross section element. */
19      private final Length longitudinalPosition;
20  
21      /**
22       * Constructor.
23       * @param crossSectionElement Cross section element for which this is a road marker. Usually this will be a Lane.
24       * @param longitudinalPosition Longitudinal position on the cross section element.
25       */
26      public RoadMarkerAcross(final CrossSectionElement crossSectionElement, final Length longitudinalPosition)
27      {
28          this.crossSectionElement = crossSectionElement;
29          this.longitudinalPosition = longitudinalPosition;
30      }
31  
32      /**
33       * Returns cross section element.
34       * @return crossSectionElement.
35       */
36      public final CrossSectionElement getCrossSectionElement()
37      {
38          return this.crossSectionElement;
39      }
40  
41      /**
42       * Returns longitudinal position.
43       * @return longitudinalPosition.
44       */
45      public final Length getLongitudinalPosition()
46      {
47          return this.longitudinalPosition;
48      }
49  
50  }