Interface LaneBasedObject
-
- All Superinterfaces:
EventProducerInterface,Identifiable,Locatable,ObjectInterface,java.io.Serializable
- All Known Subinterfaces:
SingleSensor,TrafficLight
- All Known Implementing Classes:
AbstractLaneBasedObject,AbstractSensor,AbstractTrafficLight,BusStop,Conflict,Conflict.ConflictEnd,DestinationSensor,Detector,Distraction,FlankSensor,SimpleReportingSensor,SimpleTrafficLight,SinkSensor,SpeedSign
public interface LaneBasedObject extends ObjectInterface
Objects that can be encountered on a Lane like conflict areas, GTUs, traffic lights, stop lines, etc.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Sep 9, 2016
BSD-style license. See OpenTrafficSim License.- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Field Summary
-
Fields inherited from interface org.djutils.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.media.j3d.BoundsgetBounds()Return the bounds without throwing a RemoteException.LongitudinalDirectionalitygetDirection()LanegetLane()DirectedPointgetLocation()Return the location without throwing a RemoteException.LengthgetLongitudinalPosition()static OTSLine3DmakeGeometry(Lane lane, Length position)Make a geometry perpendicular to the center line of the lane at the given position.-
Methods inherited from interface org.djutils.event.EventProducerInterface
addListener, addListener, addListener, addListener, getEventTypesWithListeners, getSourceId, hasListeners, numberOfListeners, removeListener
-
Methods inherited from interface org.opentrafficsim.base.Identifiable
getId
-
Methods inherited from interface org.opentrafficsim.core.object.ObjectInterface
getFullId, getGeometry, getHeight
-
-
-
-
Method Detail
-
getLane
Lane getLane()
- Returns:
- The lane for which this is a sensor.
-
getDirection
LongitudinalDirectionality getDirection()
- Returns:
- Longitudinal direction.
-
getLongitudinalPosition
Length getLongitudinalPosition()
- Returns:
- the position (between 0.0 and the length of the Lane) of the sensor on the design line of the lane.
-
getLocation
DirectedPoint getLocation()
Return the location without throwing a RemoteException.- Specified by:
getLocationin interfaceLocatable- Returns:
- DirectedPoint; the location
-
getBounds
javax.media.j3d.Bounds getBounds()
Return the bounds without throwing a RemoteException.
-
makeGeometry
static OTSLine3D makeGeometry(Lane lane, Length position)
Make a geometry perpendicular to the center line of the lane at the given position.- Parameters:
lane- Lane; the lane where the sensor residesposition- Length; The length of the object in the longitudinal direction, on the center line of the lane- Returns:
- a geometry perpendicular to the center line that describes the sensor
-
-