Package org.opentrafficsim.draw.gtu
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
Modifier and TypeClassDescriptionstatic 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
ConstructorDescriptionDefaultCarAnimation
(DefaultCarAnimation.GtuData gtu, nl.tudelft.simulation.naming.context.Contextualized contextualized) Construct the DefaultCarAnimation for a LaneBasedIndividualCar. -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy
(nl.tudelft.simulation.naming.context.Contextualized contextProvider) boolean
int
hashCode()
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
-
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 drawcontextualized
- Contextualized; context provider- Throws:
NamingException
- in case of registration failure of the animationRemoteException
- on communication failure
-
-
Method Details
-
paint
- Specified by:
paint
in classnl.tudelft.simulation.dsol.animation.d2.Renderable2d<DefaultCarAnimation.GtuData>
-
destroy
public void destroy(nl.tudelft.simulation.naming.context.Contextualized contextProvider) - Specified by:
destroy
in interfacenl.tudelft.simulation.dsol.animation.d2.Renderable2dInterface<DefaultCarAnimation.GtuData>
- Overrides:
destroy
in classnl.tudelft.simulation.dsol.animation.d2.Renderable2d<DefaultCarAnimation.GtuData>
-
hashCode
public int hashCode() -
equals
-