Class MapCrossSectionData

java.lang.Object
org.opentrafficsim.editor.extensions.map.MapCrossSectionData
All Implemented Interfaces:
nl.tudelft.simulation.dsol.animation.Locatable, org.opentrafficsim.base.geometry.OtsLocatable, CrossSectionElementAnimation.CrossSectionElementData
Direct Known Subclasses:
MapLaneData, MapShoulderData, MapStripeData

public class MapCrossSectionData extends Object implements CrossSectionElementAnimation.CrossSectionElementData
Cross section element 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
    Modifier and Type
    Field
    Description
    protected final org.djutils.draw.line.PolyLine2d
    Center line.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MapCrossSectionData(XsdTreeNode linkNode, org.djutils.draw.line.PolyLine2d centerLine, org.djutils.draw.line.Polygon2d contour, org.opentrafficsim.road.network.lane.SliceInfo sliceInfo)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.opentrafficsim.base.geometry.OtsBounds2d
    org.djutils.draw.line.PolyLine2d
    Returns the link id.
    org.djutils.draw.point.OrientedPoint2d
    org.djunits.value.vdouble.scalar.Length
    getWidth(org.djunits.value.vdouble.scalar.Length position)
    Returns the lane width at the give position.

    Methods inherited from class java.lang.Object

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

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

    getDirZ, getZ
  • Field Details

    • centerLine

      protected final org.djutils.draw.line.PolyLine2d centerLine
      Center line.
  • Constructor Details

    • MapCrossSectionData

      public MapCrossSectionData(XsdTreeNode linkNode, org.djutils.draw.line.PolyLine2d centerLine, org.djutils.draw.line.Polygon2d contour, org.opentrafficsim.road.network.lane.SliceInfo sliceInfo)
      Constructor.
      Parameters:
      linkNode - XsdTreeNode; node representing the element.
      centerLine - PolyLine2d; center line.
      contour - PolyLine2d; contour.
      sliceInfo - SliceInfo; slice info.
  • Method Details

    • getBounds

      public org.opentrafficsim.base.geometry.OtsBounds2d getBounds()
      Specified by:
      getBounds in interface nl.tudelft.simulation.dsol.animation.Locatable
      Specified by:
      getBounds in interface org.opentrafficsim.base.geometry.OtsLocatable
    • getLocation

      public 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
    • getCenterLine

      public org.djutils.draw.line.PolyLine2d getCenterLine()
      Specified by:
      getCenterLine in interface CrossSectionElementAnimation.CrossSectionElementData
    • getLinkId

      public String getLinkId()
      Returns the link id.
      Specified by:
      getLinkId in interface CrossSectionElementAnimation.CrossSectionElementData
      Returns:
      String; link id.
    • getWidth

      public org.djunits.value.vdouble.scalar.Length getWidth(org.djunits.value.vdouble.scalar.Length position)
      Returns the lane width at the give position.
      Parameters:
      position - Length; position along the lane.
      Returns:
      Length; lane width at the position.
    • toString

      public String toString()
      Overrides:
      toString in class Object