public class LaneDirection extends Object implements Serializable
 Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. 
 BSD-style license. See OpenTrafficSim License.
 
| Constructor and Description | 
|---|
LaneDirection(Lane lane,
             GTUDirectionality direction)  | 
| Modifier and Type | Method and Description | 
|---|---|
Length | 
coveredDistance(double fraction)
Returns the covered distance driven to the given fractional position. 
 | 
boolean | 
equals(Object obj) | 
double | 
fractionAtCoveredDistance(Length distance)
Returns the fraction along the design line for having covered the given distance. 
 | 
LaneDirection | 
getAdjacentLaneDirection(LateralDirectionality laneChangeDirection,
                        LaneBasedGTU gtu)
Returns the adjacent lane and direction. 
 | 
GTUDirectionality | 
getDirection()  | 
Lane | 
getLane()  | 
Length | 
getLength()
Returns the length of the lane. 
 | 
DirectedPoint | 
getLocationFraction(double fraction)
Returns a directed point at the given fraction, in the direction of travel (not center line). 
 | 
LaneDirection | 
getNextLaneDirection(LaneBasedGTU gtu)
Returns the next lane and direction. 
 | 
int | 
hashCode() | 
Length | 
remainingDistance(double fraction)
Returns the remaining distance to be driven from the given fractional position. 
 | 
String | 
toString() | 
public LaneDirection(Lane lane, GTUDirectionality direction)
lane - Lane; the lanedirection - GTUDirectionality; the direction to drive on this lanepublic final Lane getLane()
public final GTUDirectionality getDirection()
public final Length coveredDistance(double fraction)
fraction - double; fractional positionpublic final Length remainingDistance(double fraction)
fraction - double; fractional positionpublic final double fractionAtCoveredDistance(Length distance)
distance - Length; covered distancepublic final LaneDirection getNextLaneDirection(LaneBasedGTU gtu)
gtu - LaneBasedGTU; gtunull if nonepublic Length getLength()
public DirectedPoint getLocationFraction(double fraction) throws OTSGeometryException
fraction - double; fractional positionOTSGeometryException - in case the fractional position is not correctpublic final LaneDirection getAdjacentLaneDirection(LateralDirectionality laneChangeDirection, LaneBasedGTU gtu)
gtu - LaneBasedGTU; gtulaneChangeDirection - LateralDirectionality; lane change directionnull if noneCopyright © 2014–2019 Delft University of Technology. All rights reserved.