Class AnimationCrossSectionElementData<T extends CrossSectionElement>

java.lang.Object
org.opentrafficsim.animation.data.AnimationCrossSectionElementData<T>
Type Parameters:
T - cross-section element type.
All Implemented Interfaces:
nl.tudelft.simulation.dsol.animation.Locatable, org.opentrafficsim.base.geometry.OtsLocatable, org.opentrafficsim.base.geometry.SpatialObject, ClickableLocatable, CrossSectionElementAnimation.CrossSectionElementData
Direct Known Subclasses:
AnimationLaneData, AnimationShoulderData, AnimationStripeData

public class AnimationCrossSectionElementData<T extends CrossSectionElement> extends Object implements CrossSectionElementAnimation.CrossSectionElementData
Animation data of a CrossSectionElement.

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
  • Constructor Details

    • AnimationCrossSectionElementData

      public AnimationCrossSectionElementData(T element)
      Constructor.
      Parameters:
      element - cross section element.
  • Method Details

    • 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 CrossSectionElementAnimation.CrossSectionElementData
    • getLinkId

      public String getLinkId()
      Specified by:
      getLinkId in interface CrossSectionElementAnimation.CrossSectionElementData
    • getLocation

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

      public T getElement()
      Returns the cross section element.
      Returns:
      cross-section element.
    • toString

      public String toString()
      Overrides:
      toString in class Object