public abstract class AbstractLaneBasedObject extends org.opentrafficsim.core.object.StaticObject implements LaneBasedObject
Copyright (c) 2013-2016 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.
|
| 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) |
Lane |
getLane() |
nl.tudelft.simulation.language.d3.DirectedPoint |
getLocation()
Return the location without throwing a RemoteException.
|
org.djunits.value.vdouble.scalar.Length |
getLongitudinalPosition() |
getBounds, getGeometry, getHeight, getId, toStringaddListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBounds, makeGeometrypublic 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.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 Lane getLane()
getLane in interface LaneBasedObjectpublic final org.djunits.value.vdouble.scalar.Length getLongitudinalPosition()
getLongitudinalPosition in interface LaneBasedObjectpublic nl.tudelft.simulation.language.d3.DirectedPoint getLocation()
getLocation in interface nl.tudelft.simulation.dsol.animation.LocatablegetLocation in interface LaneBasedObjectgetLocation in class org.opentrafficsim.core.object.StaticObjectpublic 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.StaticObjectorg.opentrafficsim.core.network.NetworkExceptionpublic 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–2016 Delft University of Technology. All rights reserved.