public class OTSNode extends Object implements Node, LocatableInterface, Serializable
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-10-27 22:41:34 +0100 (Tue, 27 Oct 2015) $, @version $Revision: 1495 $, by $Author: averbraeck $,
initial version Aug 19, 2014
| Constructor and Description |
|---|
OTSNode(String id,
OTSPoint3D point)
Construction of a Node.
|
OTSNode(String id,
OTSPoint3D point,
org.djunits.value.vdouble.scalar.Angle.Abs direction,
org.djunits.value.vdouble.scalar.Angle.Abs slope)
Construction of a Node.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLinkIn(Link linkIn)
Add an incoming link to this Node.
|
void |
addLinkOut(Link linkOut)
Add an outgoing link to this Node.
|
boolean |
equals(Object obj) |
Bounds |
getBounds() |
org.djunits.value.vdouble.scalar.Angle.Abs |
getDirection() |
String |
getId() |
Set<Link> |
getLinksIn() |
Set<Link> |
getLinksOut() |
DirectedPoint |
getLocation() |
OTSPoint3D |
getPoint() |
org.djunits.value.vdouble.scalar.Angle.Abs |
getSlope() |
int |
hashCode() |
boolean |
isDirectionallyConnectedTo(GTUType gtuType,
Node toNode)
Check if the current node is linked to the given Node in the specified direction for the given GTUType.
|
String |
toString() |
public OTSNode(String id, OTSPoint3D point, org.djunits.value.vdouble.scalar.Angle.Abs direction, org.djunits.value.vdouble.scalar.Angle.Abs slope)
id - the id of the Node.point - the point with usually an x and y setting.direction - the 3D direction. "East" is 0 degrees. "North" is 90 degrees (1/2 pi radians).slope - the slope as an angle. Horizontal is 0 degrees.public OTSNode(String id, OTSPoint3D point)
id - the id of the Node.point - the point with usually an x and y setting.public final OTSPoint3D getPoint()
public final void addLinkIn(Link linkIn)
public final void addLinkOut(Link linkOut)
addLinkOut in interface NodelinkOut - the link to add.public final Set<Link> getLinksIn()
getLinksIn in interface Nodepublic final Set<Link> getLinksOut()
getLinksOut in interface Nodepublic final boolean isDirectionallyConnectedTo(GTUType gtuType, Node toNode)
isDirectionallyConnectedTo in interface NodegtuType - the GTU type to check the connection for.toNode - the to nodepublic final org.djunits.value.vdouble.scalar.Angle.Abs getDirection()
getDirection in interface Nodepublic final org.djunits.value.vdouble.scalar.Angle.Abs getSlope()
public final DirectedPoint getLocation()
getLocation in interface LocatableInterfacegetLocation in interface Nodepublic final Bounds getBounds()
getBounds in interface LocatableInterfacegetBounds in interface NodeCopyright © 2014–2015 Delft University of Technology. All rights reserved.