public abstract class AbstractLaneBasedObject extends org.opentrafficsim.core.object.StaticObject implements LaneBasedObject
Copyright (c) 2013-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
AbstractLaneBasedObject(String id,
Lane lane,
org.djunits.value.vdouble.scalar.Length longitudinalPosition,
org.opentrafficsim.core.geometry.OTSLine3D geometry)
Construct a new LaneBasedObject with the required fields.
|
AbstractLaneBasedObject(String id,
Lane lane,
org.djunits.value.vdouble.scalar.Length longitudinalPosition,
org.opentrafficsim.core.geometry.OTSLine3D geometry,
org.djunits.value.vdouble.scalar.Length height)
Construct a new AbstractLanebasedObject with the required fields.
|
AbstractLaneBasedObject(String id,
Lane lane,
org.opentrafficsim.core.network.LongitudinalDirectionality direction,
org.djunits.value.vdouble.scalar.Length longitudinalPosition,
org.opentrafficsim.core.geometry.OTSLine3D geometry)
Construct a new LaneBasedObject with the required fields.
|
AbstractLaneBasedObject(String id,
Lane lane,
org.opentrafficsim.core.network.LongitudinalDirectionality direction,
org.djunits.value.vdouble.scalar.Length longitudinalPosition,
org.opentrafficsim.core.geometry.OTSLine3D geometry,
org.djunits.value.vdouble.scalar.Length height)
Construct a new AbstractLanebasedObject with the required fields.
|
Modifier and Type | Method and Description |
---|---|
abstract AbstractLaneBasedObject |
clone(CrossSectionElement newCSE,
org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator,
boolean animation)
Clone the LaneBasedObject for e.g., copying a network.
|
org.opentrafficsim.core.object.StaticObject |
clone(org.opentrafficsim.core.network.Network newNetwork,
org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator,
boolean animation) |
org.opentrafficsim.core.network.LongitudinalDirectionality |
getDirection() |
String |
getFullId() |
Lane |
getLane() |
nl.tudelft.simulation.language.d3.DirectedPoint |
getLocation()
Return the location without throwing a RemoteException.
|
org.djunits.value.vdouble.scalar.Length |
getLongitudinalPosition() |
String |
toString() |
getBounds, getGeometry, getHeight, getId
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBounds, makeGeometry
public AbstractLaneBasedObject(String id, Lane lane, org.opentrafficsim.core.network.LongitudinalDirectionality direction, org.djunits.value.vdouble.scalar.Length longitudinalPosition, org.opentrafficsim.core.geometry.OTSLine3D geometry, org.djunits.value.vdouble.scalar.Length height) throws org.opentrafficsim.core.network.NetworkException
id
- String; the id of the new objectlane
- Lane; The lane on which the new object resides. If the new object is a Sensor; it is automatically registered
on the lanedirection
- LongitudinalDirectionality; the directionality in which this is valid.longitudinalPosition
- Length; The position (between 0.0 and the length of the Lane) of the sensor on the design
line of the lanegeometry
- OTSLine3D; the geometry of the object, which provides its location and bounds as wellheight
- Length; the height of the object, in case it is a 3D objectorg.opentrafficsim.core.network.NetworkException
- when the position on the lane is out of boundspublic AbstractLaneBasedObject(String id, Lane lane, org.djunits.value.vdouble.scalar.Length longitudinalPosition, org.opentrafficsim.core.geometry.OTSLine3D geometry, org.djunits.value.vdouble.scalar.Length height) throws org.opentrafficsim.core.network.NetworkException
id
- String; the id of the new objectlane
- Lane; The lane on which the new object resides. If the new object is a Sensor; it is automatically registered
on the lanelongitudinalPosition
- Length; The position (between 0.0 and the length of the Lane) of the sensor on the design
line of the lanegeometry
- OTSLine3D; the geometry of the object, which provides its location and bounds as wellheight
- Length; the height of the object, in case it is a 3D objectorg.opentrafficsim.core.network.NetworkException
- when the position on the lane is out of boundspublic AbstractLaneBasedObject(String id, Lane lane, org.opentrafficsim.core.network.LongitudinalDirectionality direction, org.djunits.value.vdouble.scalar.Length longitudinalPosition, org.opentrafficsim.core.geometry.OTSLine3D geometry) throws org.opentrafficsim.core.network.NetworkException
id
- String; the id of the new AbstractLaneBasedObjectlane
- Lane; The lane for which this is a sensordirection
- LongitudinalDirectionality; the directionality in which this is valid.longitudinalPosition
- Length; The position (between 0.0 and the length of the Lane) of the sensor on the design
line of the lanegeometry
- OTSLine3D; the geometry of the object, which provides its location and bounds as wellorg.opentrafficsim.core.network.NetworkException
- when the position on the lane is out of boundspublic AbstractLaneBasedObject(String id, Lane lane, org.djunits.value.vdouble.scalar.Length longitudinalPosition, org.opentrafficsim.core.geometry.OTSLine3D geometry) throws org.opentrafficsim.core.network.NetworkException
id
- String; the id of the new AbstractLaneBasedObjectlane
- Lane; The lane for which this is a sensorlongitudinalPosition
- Length; The position (between 0.0 and the length of the Lane) of the sensor on the design
line of the lanegeometry
- OTSLine3D; the geometry of the object, which provides its location and bounds as wellorg.opentrafficsim.core.network.NetworkException
- when the position on the lane is out of boundspublic final String getFullId()
getFullId
in interface org.opentrafficsim.core.object.ObjectInterface
getFullId
in class org.opentrafficsim.core.object.StaticObject
public final Lane getLane()
getLane
in interface LaneBasedObject
public final org.opentrafficsim.core.network.LongitudinalDirectionality getDirection()
getDirection
in interface LaneBasedObject
public final org.djunits.value.vdouble.scalar.Length getLongitudinalPosition()
getLongitudinalPosition
in interface LaneBasedObject
public nl.tudelft.simulation.language.d3.DirectedPoint getLocation()
getLocation
in interface nl.tudelft.simulation.dsol.animation.Locatable
getLocation
in interface LaneBasedObject
getLocation
in class org.opentrafficsim.core.object.StaticObject
public final org.opentrafficsim.core.object.StaticObject clone(org.opentrafficsim.core.network.Network newNetwork, org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator, boolean animation) throws org.opentrafficsim.core.network.NetworkException
clone
in class org.opentrafficsim.core.object.StaticObject
org.opentrafficsim.core.network.NetworkException
public String toString()
toString
in class org.opentrafficsim.core.object.StaticObject
public abstract AbstractLaneBasedObject clone(CrossSectionElement newCSE, org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator, boolean animation) throws org.opentrafficsim.core.network.NetworkException
newCSE
- CrossSectionElement; the new cross section element to which the clone belongsnewSimulator
- OTSSimulatorInterface; the new simulator for this networkanimation
- boolean; whether to (re)create animation or notorg.opentrafficsim.core.network.NetworkException
- in case the cloning failsCopyright © 2014–2017 Delft University of Technology. All rights reserved.