NODEID - the ID type of the Node, e.g., String.LINKID - the ID type of the Link, e.g., String.public class LinkLocation<LINKID,NODEID> 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-07-28 17:11:47 +0200 (Tue, 28 Jul 2015) $, @version $Revision: 1165 $, by $Author: averbraeck $,
initial version Oct 22, 2014
| Constructor and Description |
|---|
LinkLocation(Link<LINKID,NODEID> link,
double fractionalLongitudinalPosition) |
LinkLocation(Link<LINKID,NODEID> link,
DoubleScalar.Rel<LengthUnit> position) |
| Modifier and Type | Method and Description |
|---|---|
DoubleScalar.Rel<LengthUnit> |
distance(LinkLocation<LINKID,NODEID> loc)
Returns the distance to another LinkLocation.
|
double |
getFractionalLongitudinalPosition() |
Link<LINKID,NODEID> |
getLink() |
DoubleScalar.Rel<LengthUnit> |
getLongitudinalPosition() |
String |
toString() |
public LinkLocation(Link<LINKID,NODEID> 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<LINKID,NODEID> link, DoubleScalar.Rel<LengthUnit> 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 double getFractionalLongitudinalPosition()
public final DoubleScalar.Rel<LengthUnit> getLongitudinalPosition()
public final DoubleScalar.Rel<LengthUnit> distance(LinkLocation<LINKID,NODEID> loc)
loc - the link location to find the distance to.Copyright © 2014–2015 Delft University of Technology. All rights reserved.