public abstract class AbstractSensor extends nl.tudelft.simulation.event.EventProducer implements Sensor
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.
$LastChangedDate: 2015-09-14 01:33:02 +0200 (Mon, 14 Sep 2015) $, @version $Revision: 1401 $, by $Author: averbraeck $,
initial version Dec 31, 2014
Constructor and Description |
---|
AbstractSensor(Lane lane,
org.djunits.value.vdouble.scalar.Length longitudinalPosition,
org.opentrafficsim.core.gtu.RelativePosition.TYPE positionType,
String name,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Sensor o) |
boolean |
equals(Object obj) |
javax.media.j3d.Bounds |
getBounds() |
Lane |
getLane() |
nl.tudelft.simulation.language.d3.DirectedPoint |
getLocation() |
org.djunits.value.vdouble.scalar.Length |
getLongitudinalPosition() |
double |
getLongitudinalPositionSI() |
String |
getName() |
org.opentrafficsim.core.gtu.RelativePosition.TYPE |
getPositionType() |
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface |
getSimulator() |
int |
hashCode() |
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListener
public AbstractSensor(Lane lane, org.djunits.value.vdouble.scalar.Length longitudinalPosition, org.opentrafficsim.core.gtu.RelativePosition.TYPE positionType, String name, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator)
lane
- The lane for which this is a sensor.longitudinalPosition
- Length; the position (between 0.0 and the length of the Lane) of the sensor on the design
line of the lane.positionType
- RelativePosition.TYPE; the relative position type (e.g., FRONT, BACK) of the vehicle that triggers
the sensor.name
- the name of the sensor.simulator
- the simulator for being able to generate the animation.public final Lane getLane()
public final org.djunits.value.vdouble.scalar.Length getLongitudinalPosition()
getLongitudinalPosition
in interface Sensor
public final org.opentrafficsim.core.gtu.RelativePosition.TYPE getPositionType()
getPositionType
in interface Sensor
public final double getLongitudinalPositionSI()
getLongitudinalPositionSI
in interface Sensor
public final nl.tudelft.simulation.language.d3.DirectedPoint getLocation()
getLocation
in interface nl.tudelft.simulation.dsol.animation.Locatable
getLocation
in interface Sensor
public final javax.media.j3d.Bounds getBounds()
public final org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface getSimulator()
public int compareTo(Sensor o)
compareTo
in interface Comparable<Sensor>
Copyright © 2014–2016 Delft University of Technology. All rights reserved.