Class DefaultCarAnimation

java.lang.Object
nl.tudelft.simulation.dsol.animation.d2.Renderable2d<L>
org.opentrafficsim.base.geometry.OtsRenderable<DefaultCarAnimation.GtuData>
org.opentrafficsim.draw.gtu.DefaultCarAnimation
All Implemented Interfaces:
Serializable, nl.tudelft.simulation.dsol.animation.d2.Renderable2dInterface<DefaultCarAnimation.GtuData>

public class DefaultCarAnimation extends org.opentrafficsim.base.geometry.OtsRenderable<DefaultCarAnimation.GtuData>
Draw a car.

Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    GtuData provides the information required to draw a link.
    class 
    Text animation for the Car.
  • Field Summary

    Fields inherited from class org.opentrafficsim.base.geometry.OtsRenderable

    RENDERING_KEYS, RENDERING_VALUES
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultCarAnimation(DefaultCarAnimation.GtuData gtu, nl.tudelft.simulation.naming.context.Contextualized contextualized)
    Construct the DefaultCarAnimation for a LaneBasedIndividualCar.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    destroy(nl.tudelft.simulation.naming.context.Contextualized contextProvider)
    boolean
    equals(Object object)
    int
    final void
    paint(Graphics2D graphics, ImageObserver observer)

    Methods inherited from class org.opentrafficsim.base.geometry.OtsRenderable

    contains, resetRendering, setRendering, toBoundsTransform

    Methods inherited from class nl.tudelft.simulation.dsol.animation.d2.Renderable2d

    bind2Context, getId, getSource, isFlip, isRotate, isScale, isScaleObject, isScaleY, isTranslate, paint, paintComponent, setFlip, setRotate, setScale, setScaleObject, setScaleY, setTranslate, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DefaultCarAnimation

      public DefaultCarAnimation(DefaultCarAnimation.GtuData gtu, nl.tudelft.simulation.naming.context.Contextualized contextualized) throws NamingException, RemoteException
      Construct the DefaultCarAnimation for a LaneBasedIndividualCar.
      Parameters:
      gtu - GtuData; the Car to draw
      contextualized - Contextualized; context provider
      Throws:
      NamingException - in case of registration failure of the animation
      RemoteException - on communication failure
  • Method Details

    • paint

      public final void paint(Graphics2D graphics, ImageObserver observer)
      Specified by:
      paint in class nl.tudelft.simulation.dsol.animation.d2.Renderable2d<DefaultCarAnimation.GtuData>
    • destroy

      public void destroy(nl.tudelft.simulation.naming.context.Contextualized contextProvider)
      Specified by:
      destroy in interface nl.tudelft.simulation.dsol.animation.d2.Renderable2dInterface<DefaultCarAnimation.GtuData>
      Overrides:
      destroy in class nl.tudelft.simulation.dsol.animation.d2.Renderable2d<DefaultCarAnimation.GtuData>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object