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.Bounds2d
getColor()
org.djutils.draw.line.Polygon2d
org.djunits.value.vdouble.scalar.Length
getFront()
getGtu()
Returns the GTU.getId()
org.djunits.value.vdouble.scalar.Length
org.djutils.draw.point.OrientedPoint2d
org.djunits.value.vdouble.scalar.Length
getRear()
org.opentrafficsim.base.geometry.OtsShape
getShape()
org.djunits.value.vdouble.scalar.Length
getWidth()
boolean
boolean
boolean
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opentrafficsim.draw.gtu.DefaultCarAnimation.GtuData
getZ
Methods 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:
getLocation
in interfaceDefaultCarAnimation.GtuData
- Specified by:
getLocation
in interfacenl.tudelft.simulation.dsol.animation.Locatable
- Specified by:
getLocation
in interfaceorg.opentrafficsim.base.geometry.OtsLocatable
-
getContour
public org.djutils.draw.line.Polygon2d getContour()- Specified by:
getContour
in interfaceorg.opentrafficsim.base.geometry.SpatialObject
-
getBounds
public org.djutils.draw.bounds.Bounds2d getBounds()- Specified by:
getBounds
in interfacenl.tudelft.simulation.dsol.animation.Locatable
- Specified by:
getBounds
in interfaceorg.opentrafficsim.base.geometry.OtsLocatable
-
getShape
public org.opentrafficsim.base.geometry.OtsShape getShape()- Specified by:
getShape
in interfaceorg.opentrafficsim.base.geometry.OtsLocatable
-
getId
- Specified by:
getId
in interfaceorg.djutils.base.Identifiable
-
getColor
- Specified by:
getColor
in interfaceDefaultCarAnimation.GtuData
-
getLength
public org.djunits.value.vdouble.scalar.Length getLength()- Specified by:
getLength
in interfaceDefaultCarAnimation.GtuData
-
getWidth
public org.djunits.value.vdouble.scalar.Length getWidth()- Specified by:
getWidth
in interfaceDefaultCarAnimation.GtuData
-
getFront
public org.djunits.value.vdouble.scalar.Length getFront()- Specified by:
getFront
in interfaceDefaultCarAnimation.GtuData
-
getRear
public org.djunits.value.vdouble.scalar.Length getRear()- Specified by:
getRear
in interfaceDefaultCarAnimation.GtuData
-
leftIndicatorOn
public boolean leftIndicatorOn()- Specified by:
leftIndicatorOn
in interfaceDefaultCarAnimation.GtuData
-
rightIndicatorOn
public boolean rightIndicatorOn()- Specified by:
rightIndicatorOn
in interfaceDefaultCarAnimation.GtuData
-
getMarker
- Specified by:
getMarker
in interfaceDefaultCarAnimation.GtuData
-
isBrakingLightsOn
public boolean isBrakingLightsOn()- Specified by:
isBrakingLightsOn
in interfaceDefaultCarAnimation.GtuData
-
getGtu
Returns the GTU.- Returns:
- GTU.
-
toString
-