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
All Known Implementing Classes:
AbstractLaneBasedObject, BusStop, Conflict, Conflict.ConflictEnd, Distraction, 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.
    org.djutils.draw.point.OrientedPoint2d
    org.djunits.value.vdouble.scalar.Length
     
    static org.djutils.draw.line.PolyLine2d
    makeGeometry(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
    makeGeometry(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, getGeometry, getHeight

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

    getBounds
  • 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; 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
    • makeGeometry

      static org.djutils.draw.line.PolyLine2d makeGeometry(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 - Lane; the lane for which to make a perpendicular geometry
      longitudinalPosition - Length; the position on the lane
      Returns:
      an OtsLine2d that describes the line
    • makeGeometry

      static org.djutils.draw.line.PolyLine2d makeGeometry(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 - Lane; the lane for which to make a perpendicular geometry
      longitudinalPosition - Length; the position on the lane
      relativeWidth - double; lane width to use
      Returns:
      an OtsLine2d that describes the line