Class MapStripeData

java.lang.Object
org.opentrafficsim.editor.extensions.map.MapCrossSectionData
org.opentrafficsim.editor.extensions.map.MapStripeData
All Implemented Interfaces:
nl.tudelft.simulation.dsol.animation.Locatable, org.opentrafficsim.base.geometry.OtsLocatable, org.opentrafficsim.base.geometry.SpatialObject, org.opentrafficsim.draw.ClickableLineLocatable, org.opentrafficsim.draw.ClickableLocatable, org.opentrafficsim.draw.road.CrossSectionElementAnimation.CrossSectionElementData, org.opentrafficsim.draw.road.StripeAnimation.StripeData

public class MapStripeData extends MapCrossSectionData implements org.opentrafficsim.draw.road.StripeAnimation.StripeData
Stripe data for in the editor.

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

Author:
Wouter Schakel
  • Field Summary

    Fields inherited from interface org.opentrafficsim.draw.ClickableLocatable

    EXPANSE
  • Constructor Summary

    Constructors
    Constructor
    Description
    MapStripeData(org.djunits.value.vdouble.scalar.Length dashOffset, XsdTreeNode linkNode, org.opentrafficsim.road.network.lane.CrossSectionGeometry geometry, List<org.opentrafficsim.base.StripeElement> elements, org.opentrafficsim.base.StripeElement.StripeLateralSync lateralSync, org.djutils.draw.line.PolyLine2d linkLine, MapLinkData.MiddleOffset middleOffset, org.djunits.value.vdouble.scalar.Direction startDirection, org.djunits.value.vdouble.scalar.Direction endDirection)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.opentrafficsim.base.geometry.DirectionalPolyLine
     
    org.djunits.value.vdouble.scalar.Length
     
    List<org.opentrafficsim.base.StripeElement>
     
    org.opentrafficsim.base.StripeElement.StripeLateralSync
    Returns the lateral sync.
    org.djutils.draw.line.PolyLine2d
     
    org.djutils.draw.line.PolyLine2d
     
    org.djunits.value.vdouble.scalar.Length
    getWidth(org.djunits.value.vdouble.scalar.Length position)
    Returns the lane width at the give position.
    void
    setDashOffset(org.djunits.value.vdouble.scalar.Length dashOffset)
    Sets a new dash offset, which should only occur due to synchronization.
     

    Methods inherited from class org.opentrafficsim.editor.extensions.map.MapCrossSectionData

    getContour, getLinkId, getLocation, getShape

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.opentrafficsim.draw.ClickableLineLocatable

    getBounds

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

    getDirZ

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

    getShape

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

    getContour

    Methods inherited from interface org.opentrafficsim.draw.road.StripeAnimation.StripeData

    getLocation, getZ
  • Constructor Details

    • MapStripeData

      public MapStripeData(org.djunits.value.vdouble.scalar.Length dashOffset, XsdTreeNode linkNode, org.opentrafficsim.road.network.lane.CrossSectionGeometry geometry, List<org.opentrafficsim.base.StripeElement> elements, org.opentrafficsim.base.StripeElement.StripeLateralSync lateralSync, org.djutils.draw.line.PolyLine2d linkLine, MapLinkData.MiddleOffset middleOffset, org.djunits.value.vdouble.scalar.Direction startDirection, org.djunits.value.vdouble.scalar.Direction endDirection)
      Constructor.
      Parameters:
      dashOffset - dash offset
      linkNode - node representing the element
      geometry - geometry
      elements - elements
      lateralSync - lateral synchronization
      linkLine - link line
      middleOffset - middle offsets to determine link reference line
      startDirection - start direction
      endDirection - end direction
  • Method Details

    • getLine

      public org.djutils.draw.line.PolyLine2d getLine()
      Specified by:
      getLine in interface org.opentrafficsim.draw.ClickableLineLocatable
    • getWidth

      public org.djunits.value.vdouble.scalar.Length getWidth(org.djunits.value.vdouble.scalar.Length position)
      Description copied from class: MapCrossSectionData
      Returns the lane width at the give position.
      Specified by:
      getWidth in interface org.opentrafficsim.draw.road.StripeAnimation.StripeData
      Overrides:
      getWidth in class MapCrossSectionData
      Parameters:
      position - position along the lane.
      Returns:
      lane width at the position.
    • getReferenceLine

      public org.djutils.draw.line.PolyLine2d getReferenceLine()
      Specified by:
      getReferenceLine in interface org.opentrafficsim.draw.road.StripeAnimation.StripeData
    • getCenterLine

      public org.opentrafficsim.base.geometry.DirectionalPolyLine getCenterLine()
      Specified by:
      getCenterLine in interface org.opentrafficsim.draw.road.CrossSectionElementAnimation.CrossSectionElementData
      Specified by:
      getCenterLine in interface org.opentrafficsim.draw.road.StripeAnimation.StripeData
      Overrides:
      getCenterLine in class MapCrossSectionData
    • getElements

      public List<org.opentrafficsim.base.StripeElement> getElements()
      Specified by:
      getElements in interface org.opentrafficsim.draw.road.StripeAnimation.StripeData
    • getDashOffset

      public org.djunits.value.vdouble.scalar.Length getDashOffset()
      Specified by:
      getDashOffset in interface org.opentrafficsim.draw.road.StripeAnimation.StripeData
    • getLateralSync

      public org.opentrafficsim.base.StripeElement.StripeLateralSync getLateralSync()
      Returns the lateral sync.
      Returns:
      lateral sync.
    • setDashOffset

      public void setDashOffset(org.djunits.value.vdouble.scalar.Length dashOffset)
      Sets a new dash offset, which should only occur due to synchronization.
      Parameters:
      dashOffset - dash offset
    • toString

      public String toString()
      Overrides:
      toString in class MapCrossSectionData