Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## sim.portrayal.simple
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.

Field Summary
`double` | `value` A value from 1.0 to 0.0 indicating how far "back in time" this segment is supposed to be.

Fields inherited from class sim.portrayal.network.EdgeDrawInfo2D
`secondPoint`

Fields inherited from class sim.portrayal.DrawInfo2D
`clip, draw, location, precise, selected`

Constructor Summary
`TrailedPortrayal2D.TrailDrawInfo2D(DrawInfo2D other, java.awt.geom.Point2D.Double secondPoint)`
`TrailedPortrayal2D.TrailDrawInfo2D(EdgeDrawInfo2D other)`
`TrailedPortrayal2D.TrailDrawInfo2D(java.awt.geom.Rectangle2D.Double draw, java.awt.geom.Rectangle2D.Double clip, java.awt.geom.Point2D.Double secondPoint)`

Method Summary

Methods inherited from class sim.portrayal.network.EdgeDrawInfo2D
`toString`

Methods inherited from class sim.portrayal.DrawInfo2D
`equals`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### value

    public double value

  A value from 1.0 to 0.0 indicating how far "back in time" this segment is supposed to be.

Constructor Detail

### TrailedPortrayal2D.TrailDrawInfo2D

    public TrailedPortrayal2D.TrailDrawInfo2D(java.awt.geom.Rectangle2D.Double draw,
                                              java.awt.geom.Rectangle2D.Double clip,
                                              java.awt.geom.Point2D.Double secondPoint)

### TrailedPortrayal2D.TrailDrawInfo2D

    public TrailedPortrayal2D.TrailDrawInfo2D(DrawInfo2D other,
                                              java.awt.geom.Point2D.Double secondPoint)

### TrailedPortrayal2D.TrailDrawInfo2D

    public TrailedPortrayal2D.TrailDrawInfo2D(EdgeDrawInfo2D other)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD