Class AnimationGtuData
java.lang.Object
org.opentrafficsim.animation.data.AnimationGtuData
- All Implemented Interfaces:
nl.tudelft.simulation.dsol.animation.Locatable,org.djutils.base.Identifiable,org.opentrafficsim.base.geometry.OtsLocatable,org.opentrafficsim.base.geometry.SpatialObject,DefaultCarAnimation.GtuData
Animation data of a LaneBasedGtu.
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opentrafficsim.draw.gtu.DefaultCarAnimation.GtuData
DefaultCarAnimation.GtuData.GtuMarker -
Constructor Summary
ConstructorsConstructorDescriptionAnimationGtuData(GtuColorerManager gtuColorerManager, LaneBasedGtu gtu, DefaultCarAnimation.GtuData.GtuMarker marker) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.djutils.draw.bounds.Bounds2dgetColor()org.djutils.draw.line.Polygon2dorg.djunits.value.vdouble.scalar.LengthgetFront()getGtu()Returns the GTU.getId()org.djunits.value.vdouble.scalar.Lengthorg.djutils.draw.point.OrientedPoint2dorg.djunits.value.vdouble.scalar.LengthgetRear()org.opentrafficsim.base.geometry.OtsShapegetShape()org.djunits.value.vdouble.scalar.LengthgetWidth()booleanbooleanbooleantoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opentrafficsim.draw.gtu.DefaultCarAnimation.GtuData
getZMethods inherited from interface nl.tudelft.simulation.dsol.animation.Locatable
getDirZ
-
Constructor Details
-
AnimationGtuData
public AnimationGtuData(GtuColorerManager gtuColorerManager, LaneBasedGtu gtu, DefaultCarAnimation.GtuData.GtuMarker marker) Constructor.- Parameters:
gtuColorerManager- factory.gtu- GTU.marker- marker
-
-
Method Details
-
getLocation
public org.djutils.draw.point.OrientedPoint2d getLocation()- Specified by:
getLocationin interfaceDefaultCarAnimation.GtuData- Specified by:
getLocationin interfacenl.tudelft.simulation.dsol.animation.Locatable- Specified by:
getLocationin interfaceorg.opentrafficsim.base.geometry.OtsLocatable
-
getContour
public org.djutils.draw.line.Polygon2d getContour()- Specified by:
getContourin interfaceorg.opentrafficsim.base.geometry.SpatialObject
-
getBounds
public org.djutils.draw.bounds.Bounds2d getBounds()- Specified by:
getBoundsin interfacenl.tudelft.simulation.dsol.animation.Locatable- Specified by:
getBoundsin interfaceorg.opentrafficsim.base.geometry.OtsLocatable
-
getShape
public org.opentrafficsim.base.geometry.OtsShape getShape()- Specified by:
getShapein interfaceorg.opentrafficsim.base.geometry.OtsLocatable
-
getId
- Specified by:
getIdin interfaceorg.djutils.base.Identifiable
-
getColor
- Specified by:
getColorin interfaceDefaultCarAnimation.GtuData
-
getLength
public org.djunits.value.vdouble.scalar.Length getLength()- Specified by:
getLengthin interfaceDefaultCarAnimation.GtuData
-
getWidth
public org.djunits.value.vdouble.scalar.Length getWidth()- Specified by:
getWidthin interfaceDefaultCarAnimation.GtuData
-
getFront
public org.djunits.value.vdouble.scalar.Length getFront()- Specified by:
getFrontin interfaceDefaultCarAnimation.GtuData
-
getRear
public org.djunits.value.vdouble.scalar.Length getRear()- Specified by:
getRearin interfaceDefaultCarAnimation.GtuData
-
leftIndicatorOn
public boolean leftIndicatorOn()- Specified by:
leftIndicatorOnin interfaceDefaultCarAnimation.GtuData
-
rightIndicatorOn
public boolean rightIndicatorOn()- Specified by:
rightIndicatorOnin interfaceDefaultCarAnimation.GtuData
-
getMarker
- Specified by:
getMarkerin interfaceDefaultCarAnimation.GtuData
-
isBrakingLightsOn
public boolean isBrakingLightsOn()- Specified by:
isBrakingLightsOnin interfaceDefaultCarAnimation.GtuData
-
getGtu
Returns the GTU.- Returns:
- GTU.
-
toString
-