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, org.opentrafficsim.base.geometry.SpatialObject, org.opentrafficsim.draw.ClickableLocatable, org.opentrafficsim.draw.road.CrossSectionElementAnimation.CrossSectionElementData
Direct Known Subclasses:
MapLaneData, MapShoulderData, MapStripeData

public class MapCrossSectionData extends Object implements org.opentrafficsim.draw.road.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 inherited from interface org.opentrafficsim.draw.ClickableLocatable

    EXPANSE
  • Constructor Summary

    Constructors
    Constructor
    Description
    MapCrossSectionData(XsdTreeNode linkNode, org.opentrafficsim.road.network.lane.CrossSectionGeometry geometry)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.djutils.draw.line.PolyLine2d
     
    org.djutils.draw.line.Polygon2d
     
    Returns the link id.
    org.djutils.draw.point.OrientedPoint2d
     
    org.opentrafficsim.base.geometry.OtsShape
     
    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 org.opentrafficsim.draw.ClickableLocatable

    getBounds

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

    getDirZ, getZ
  • Constructor Details

    • MapCrossSectionData

      public MapCrossSectionData(XsdTreeNode linkNode, org.opentrafficsim.road.network.lane.CrossSectionGeometry geometry)
      Constructor.
      Parameters:
      linkNode - node representing the element
      geometry - geometry
  • Method Details

    • 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
    • getContour

      public org.djutils.draw.line.Polygon2d getContour()
      Specified by:
      getContour in interface org.opentrafficsim.base.geometry.SpatialObject
    • getShape

      public org.opentrafficsim.base.geometry.OtsShape getShape()
      Specified by:
      getShape in interface org.opentrafficsim.base.geometry.OtsLocatable
    • getCenterLine

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

      public String getLinkId()
      Returns the link id.
      Specified by:
      getLinkId in interface org.opentrafficsim.draw.road.CrossSectionElementAnimation.CrossSectionElementData
      Returns:
      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 - position along the lane.
      Returns:
      lane width at the position.
    • toString

      public String toString()
      Overrides:
      toString in class Object