Class LanePosition

java.lang.Object
org.opentrafficsim.road.network.lane.LanePosition
All Implemented Interfaces:
Serializable

public class LanePosition extends Object implements Serializable
Store one position and lane of a GTU.

Copyright (c) 2013-2023 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
See Also:
  • Constructor Details

    • LanePosition

      public LanePosition(Lane lane, Length position)
      Construct a new LanePosition.
      Parameters:
      lane - Lane; the lane for the position
      position - Length; the position on the lane, relative to the cross section link (design line) line, or against it
  • Method Details

    • getLane

      public final Lane getLane()
      Retrieve the lane.
      Returns:
      Lane; the lane for the position
    • getPosition

      public final Length getPosition()
      Retrieve the position on the lane.
      Returns:
      Length; the position on the lane, relative to the cross section link (design line)
    • getLocation

      public final DirectedPoint getLocation()
      Retrieve the location and direction of the GTU on the lane.
      Returns:
      DirectedPoint; the location and direction of the GTU on the lane
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public final String toString()
      Overrides:
      toString in class Object