Class TrailedPortrayal2D.TrailDrawInfo2D

java.lang.Object
sim.portrayal.DrawInfo2D
sim.portrayal.network.EdgeDrawInfo2D
sim.portrayal.simple.TrailedPortrayal2D.TrailDrawInfo2D
Enclosing class:
TrailedPortrayal2D

public static class TrailedPortrayal2D.TrailDrawInfo2D extends EdgeDrawInfo2D
A special version of DrawInfo2D which adds additional information useful for drawing your own trails. Instances of this class are what will be sent to the "trail" SimplePortrayal2D object when it is called upon to draw a trail segment.

The TrailDrawInfo2D adds two additional items beyond the standard DrawInfo2D stuff:

  • Point2D.Double secondPoint: (inherited from EdgeDrawInfo2D) this provides one end of the trail segment to be drawn. draw.x and draw.y provide the other end of the segment.

  • double value: a number between 0.0 and 1.0, representing how far back in time the segment represents. If 1.0, the segment is maximally far back in time and won't be drawn next time. If 0.0, the segment is nearly brand new and probably quite close to the current location of the object.