public class LinkLocation extends Object
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-09-26 12:11:42 +0200 (Sat, 26 Sep 2015) $, @version $Revision: 1454 $, by $Author: averbraeck $,
initial version Oct 22, 2014
| Constructor and Description |
|---|
LinkLocation(Link link,
double fractionalLongitudinalPosition) |
LinkLocation(Link link,
org.djunits.value.vdouble.scalar.Length.Rel position) |
| Modifier and Type | Method and Description |
|---|---|
org.djunits.value.vdouble.scalar.Length.Rel |
distance(LinkLocation loc)
Returns the distance to another LinkLocation.
|
double |
getFractionalLongitudinalPosition() |
Link |
getLink() |
org.djunits.value.vdouble.scalar.Length.Rel |
getLongitudinalPosition() |
String |
toString() |
public LinkLocation(Link link, double fractionalLongitudinalPosition)
link - The link of the location of a point relative to the GTU.fractionalLongitudinalPosition - The fractional position (between 0.0 and 1.0) of the reference point on the link.public LinkLocation(Link link, org.djunits.value.vdouble.scalar.Length.Rel position)
link - The link of the location of a point relative to the GTU.position - The position as a length of the reference point on the link.public final Link getLink()
public final double getFractionalLongitudinalPosition()
public final org.djunits.value.vdouble.scalar.Length.Rel getLongitudinalPosition()
public final org.djunits.value.vdouble.scalar.Length.Rel distance(LinkLocation loc)
loc - the link location to find the distance to.Copyright © 2014–2016 Delft University of Technology. All rights reserved.