Class OTSRoadNode
java.lang.Object
org.opentrafficsim.core.network.OTSNode
org.opentrafficsim.road.network.lane.OTSRoadNode
- All Implemented Interfaces:
java.io.Serializable
,Locatable
,Identifiable
,Drawable
,Node
public class OTSRoadNode extends OTSNode
The Node is a point with an id and a direction. It is used in the network to connect Links.
Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2019-04-25 17:00:14 +0200 (Thu, 25 Apr 2019) $, @version $Revision: 5424 $, by $Author: pknoppers $,
initial version May 5, 2019
- Author:
- Alexander Verbraeck, Peter Knoppers, Guus Tamminga
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description OTSRoadNode(Network network, java.lang.String id, OTSPoint3D point, Direction direction)
Construct a new OTSRoadNode. -
Method Summary
Modifier and Type Method Description DirectedPoint
getLocation()
Methods inherited from class org.opentrafficsim.core.network.OTSNode
addConnection, addConnections, addLink, clone1, clone2, equals, getBounds, getHeading, getId, getLinks, getNetwork, getPoint, hashCode, isCentroid, isDirectionallyConnectedTo, nextLinks, removeLink, toString
-
Constructor Details
-
OTSRoadNode
public OTSRoadNode(Network network, java.lang.String id, OTSPoint3D point, Direction direction) throws NetworkExceptionConstruct a new OTSRoadNode.- Parameters:
network
- Network; the networkid
- String; name of the nodepoint
- OTSPoint3D location of the nodedirection
- Direction; driving direction at the node- Throws:
NetworkException
- if node already exists in the network, or if name of the node is not unique.
-
-
Method Details
-
getLocation
- Specified by:
getLocation
in interfaceLocatable
- Overrides:
getLocation
in classOTSNode
-