Interface LaneBasedObject

All Superinterfaces:
org.djutils.event.EventProducer, org.djutils.base.Identifiable, nl.tudelft.simulation.dsol.animation.Locatable, LocatedObject, org.opentrafficsim.base.geometry.OtsLocatable, Remote, Serializable, org.opentrafficsim.base.geometry.SpatialObject
All Known Implementing Classes:
AbstractLaneBasedObject, BusStop, Conflict, Conflict.ConflictEnd, Distraction, LaneBasedGtu, LaneDetector, LoopDetector, ReportingDetector, SinkDetector, SpeedSign, TrafficLight, TrafficLightDetector.StartEndDetector

public interface LaneBasedObject extends LocatedObject
Objects that can be encountered on a Lane like conflict areas, GTUs, traffic lights, stop lines, etc.

Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Field Summary

    Fields inherited from interface org.djutils.event.EventProducer

    FIRST_POSITION, LAST_POSITION
  • Method Summary

    Modifier and Type
    Method
    Description
     
    default org.djunits.value.vdouble.scalar.Length
    Returns the length of the object.
    default org.djutils.draw.line.PolyLine2d
    Returns the line that represent the location of this object on the lane.
    org.djutils.draw.point.OrientedPoint2d
     
    org.djunits.value.vdouble.scalar.Length
     
    Returns the simulator.
    static org.djutils.draw.line.PolyLine2d
    makeLine(Lane lane, org.djunits.value.vdouble.scalar.Length longitudinalPosition)
    Make a geometry perpendicular to the center line of the lane with a length 90% of the width of the lane.
    static org.djutils.draw.line.PolyLine2d
    makeLine(Lane lane, org.djunits.value.vdouble.scalar.Length longitudinalPosition, double relativeWidth)
    Make a geometry perpendicular to the center line of the lane with a length of given fraction of the width of the lane.

    Methods inherited from interface org.djutils.event.EventProducer

    addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventListenerMap, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener

    Methods inherited from interface org.djutils.base.Identifiable

    getId

    Methods inherited from interface nl.tudelft.simulation.dsol.animation.Locatable

    getDirZ, getZ

    Methods inherited from interface org.opentrafficsim.core.object.LocatedObject

    getFullId, getHeight

    Methods inherited from interface org.opentrafficsim.base.geometry.OtsLocatable

    getBounds, getShape

    Methods inherited from interface org.opentrafficsim.base.geometry.SpatialObject

    getContour
  • Method Details

    • getLane

      Lane getLane()
      Returns:
      The lane for which this is a sensor.
    • getLongitudinalPosition

      org.djunits.value.vdouble.scalar.Length getLongitudinalPosition()
      Returns:
      the position (between 0.0 and the length of the Lane) of the sensor on the design line of the lane.
    • getLength

      default org.djunits.value.vdouble.scalar.Length getLength()
      Returns the length of the object. The default value is zero.
      Returns:
      length of the object.
    • getLocation

      org.djutils.draw.point.OrientedPoint2d getLocation()
      Specified by:
      getLocation in interface nl.tudelft.simulation.dsol.animation.Locatable
      Specified by:
      getLocation in interface org.opentrafficsim.base.geometry.OtsLocatable
    • getLine

      default org.djutils.draw.line.PolyLine2d getLine()
      Returns the line that represent the location of this object on the lane.
      Returns:
      the line that represent the location of this object on the lane.
    • getSimulator

      default OtsSimulatorInterface getSimulator()
      Returns the simulator.
      Returns:
      simulator
    • makeLine

      static org.djutils.draw.line.PolyLine2d makeLine(Lane lane, org.djunits.value.vdouble.scalar.Length longitudinalPosition)
      Make a geometry perpendicular to the center line of the lane with a length 90% of the width of the lane.
      Parameters:
      lane - the lane for which to make a perpendicular geometry
      longitudinalPosition - the position on the lane
      Returns:
      an polygon that describes the object
    • makeLine

      static org.djutils.draw.line.PolyLine2d makeLine(Lane lane, org.djunits.value.vdouble.scalar.Length longitudinalPosition, double relativeWidth)
      Make a geometry perpendicular to the center line of the lane with a length of given fraction of the width of the lane.
      Parameters:
      lane - the lane for which to make a perpendicular geometry
      longitudinalPosition - the position on the lane
      relativeWidth - lane width to use
      Returns:
      an OtsLine2d that describes the line