public class LinkLocation 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.
$LastChangedDate: 2019-01-06 01:35:05 +0100 (Sun, 06 Jan 2019) $, @version $Revision: 4831 $, by $Author: averbraeck $,
initial version Oct 22, 2014
Constructor and Description |
---|
LinkLocation(Link link,
double fractionalLongitudinalPosition) |
LinkLocation(Link link,
Length position) |
Modifier and Type | Method and Description |
---|---|
Length |
distance(LinkLocation loc)
Returns the distance to another LinkLocation.
|
double |
getFractionalLongitudinalPosition() |
Link |
getLink() |
Length |
getLongitudinalPosition() |
String |
toString() |
public LinkLocation(Link link, double fractionalLongitudinalPosition)
link
- Link; The link of the location of a point relative to the GTU.fractionalLongitudinalPosition
- double; The fractional position (between 0.0 and 1.0) of the reference point on the
link.public final Link getLink()
public final double getFractionalLongitudinalPosition()
public final Length getLongitudinalPosition()
public final Length distance(LinkLocation loc)
loc
- LinkLocation; the link location to find the distance to.Copyright © 2014–2019 Delft University of Technology. All rights reserved.