Class AccelerationGtuColorer
- java.lang.Object
-
- org.opentrafficsim.core.animation.gtu.colorer.AccelerationGtuColorer
-
- All Implemented Interfaces:
Serializable,Colorer<Gtu>,GtuColorer
public class AccelerationGtuColorer extends Object implements GtuColorer, Serializable
Color GTUs based on their current acceleration.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision: 4763 $, $LastChangedDate: 2018-11-19 11:04:56 +0100 (Mon, 19 Nov 2018) $, by $Author: averbraeck $,
initial version 29 mei 2015
- Author:
- Alexander Verbraeck, Peter Knoppers
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opentrafficsim.core.animation.gtu.colorer.GtuColorer
GtuColorer.LegendEntry
-
-
Constructor Summary
Constructors Constructor Description AccelerationGtuColorer(Acceleration maximumDeceleration, Acceleration maximumAcceleration)Construct a new AccelerationGTUColorer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorgetColor(Gtu gtu)Get the color, based on the Drawable object.List<GtuColorer.LegendEntry>getLegend()Return a list of legend entries (useful to make a legend of the colors used to render the GTUs).StringtoString()
-
-
-
Constructor Detail
-
AccelerationGtuColorer
public AccelerationGtuColorer(Acceleration maximumDeceleration, Acceleration maximumAcceleration)
Construct a new AccelerationGTUColorer.- Parameters:
maximumDeceleration- Acceleration; the deceleration (negative acceleration) that corresponds to the first (red) legend entrymaximumAcceleration- Acceleration; the deceleration that corresponds to the last (blue) legend entry
-
-
Method Detail
-
getLegend
public final List<GtuColorer.LegendEntry> getLegend()
Return a list of legend entries (useful to make a legend of the colors used to render the GTUs).- Specified by:
getLegendin interfaceGtuColorer- Returns:
- List<LegendEntry>; the list of legend entries; the caller should not (try to) modify this List
-
-