Package org.opentrafficsim.draw.gtu
Interface DefaultCarAnimation.GtuData
- All Superinterfaces:
Identifiable,nl.tudelft.simulation.dsol.animation.Locatable,OtsShape
- Enclosing class:
- DefaultCarAnimation
GtuData provides the information required to draw a link.
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:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumMarker for GTU when zoomed out. -
Field Summary
Fields inherited from interface org.opentrafficsim.base.geometry.OtsShape
DEFAULT_POLYGON_SEGMENTS, WORLD_MARGIN_LINE -
Method Summary
Modifier and TypeMethodDescriptiongetColor()Returns the GTU color.default doublegetDirZ()getFront()Returns the distance towards the front.Returns the length.default RectangularShapeReturns the shape of a marker to show when zoomed out.default OtsLine2dgetPath()Returns the path.getRear()Returns the distance towards the rear.getWidth()Returns the width.default doublegetZ()booleanReturns whether the braking lights are on.booleanReturns whether the left indicator is on.booleanReturns whether the right indicator is on.Methods inherited from interface org.djutils.base.Identifiable
getIdMethods inherited from interface org.opentrafficsim.base.geometry.OtsShape
contains, contains, getAbsoluteBounds, getAbsoluteContour, getAbsoluteContour, getRelativeBounds, getRelativeContour, signedDistance, signedDistance
-
Method Details
-
getColor
Color getColor()Returns the GTU color.- Returns:
- GTU color.
-
getLength
Length getLength()Returns the length.- Returns:
- length.
-
getWidth
Length getWidth()Returns the width.- Returns:
- width.
-
getFront
Length getFront()Returns the distance towards the front.- Returns:
- distance towards the front.
-
getRear
Length getRear()Returns the distance towards the rear.- Returns:
- distance towards the rear.
-
leftIndicatorOn
boolean leftIndicatorOn()Returns whether the left indicator is on.- Returns:
- whether the left indicator is on.
-
rightIndicatorOn
boolean rightIndicatorOn()Returns whether the right indicator is on.- Returns:
- whether the right indicator is on.
-
getMarker
Returns the shape of a marker to show when zoomed out.- Returns:
- shape of a marker to show when zoomed out.
-
isBrakingLightsOn
boolean isBrakingLightsOn()Returns whether the braking lights are on.- Returns:
- whether the braking lights are on.
-
getLocation
DirectedPoint2d getLocation()- Specified by:
getLocationin interfacenl.tudelft.simulation.dsol.animation.Locatable- Specified by:
getLocationin interfaceOtsShape
-
getZ
default double getZ()- Specified by:
getZin interfacenl.tudelft.simulation.dsol.animation.Locatable
-
getDirZ
default double getDirZ() -
getPath
Returns the path.- Returns:
- path
-