Class AnimationConflictData

java.lang.Object
org.opentrafficsim.animation.data.AnimationConflictData
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, AbstractLineAnimation.LaneBasedObjectData, ConflictAnimation.ConflictData

public class AnimationConflictData extends Object implements ConflictAnimation.ConflictData
Animation data of a Conflict.

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

    • AnimationConflictData

      public AnimationConflictData(Conflict conflict)
      Constructor.
      Parameters:
      conflict - conflict.
  • Method Details

    • getLaneWidth

      public org.djunits.value.vdouble.scalar.Length getLaneWidth()
      Specified by:
      getLaneWidth in interface AbstractLineAnimation.LaneBasedObjectData
    • getLocation

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

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

      public Color getColor()
      Specified by:
      getColor in interface ConflictAnimation.ConflictData
    • getBounds

      public org.djutils.draw.bounds.Bounds2d getBounds()
      Specified by:
      getBounds in interface ClickableLineLocatable
      Specified by:
      getBounds in interface ClickableLocatable
      Specified by:
      getBounds in interface nl.tudelft.simulation.dsol.animation.Locatable
      Specified by:
      getBounds 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
    • getLine

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

      public boolean isCrossing()
      Specified by:
      isCrossing in interface ConflictAnimation.ConflictData
    • isPermitted

      public boolean isPermitted()
      Specified by:
      isPermitted in interface ConflictAnimation.ConflictData
    • getConflict

      public Conflict getConflict()
      Returns the Conflict.
      Returns:
      GTU.
    • toString

      public String toString()
      Overrides:
      toString in class Object