Class AnimationLinkData

java.lang.Object
org.opentrafficsim.animation.data.AnimationLinkData
All Implemented Interfaces:
nl.tudelft.simulation.dsol.animation.Locatable, org.djutils.base.Identifiable, org.opentrafficsim.base.geometry.OtsLocatable, org.opentrafficsim.base.geometry.SpatialObject, ClickableLineLocatable, ClickableLocatable, LinkAnimation.LinkData

public class AnimationLinkData extends Object implements LinkAnimation.LinkData
Animation data of a Link.

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

    • AnimationLinkData

      public AnimationLinkData(org.opentrafficsim.core.network.Link link)
      Constructor.
      Parameters:
      link - link.
  • 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
    • getId

      public String getId()
      Specified by:
      getId in interface org.djutils.base.Identifiable
    • isConnector

      public boolean isConnector()
      Specified by:
      isConnector in interface LinkAnimation.LinkData
    • getCenterLine

      public org.djutils.draw.line.PolyLine2d getCenterLine()
      Specified by:
      getCenterLine in interface LinkAnimation.LinkData
    • getLine

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

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

      public org.opentrafficsim.core.network.Link getLink()
      Returns the link.
      Returns:
      link.
    • toString

      public String toString()
      Overrides:
      toString in class Object