Package sim.portrayal.simple
Class TrailedPortrayal2D.TrailDrawInfo2D
java.lang.Object
sim.portrayal.DrawInfo2D
sim.portrayal.network.EdgeDrawInfo2D
sim.portrayal.simple.TrailedPortrayal2D.TrailDrawInfo2D
- Enclosing class:
TrailedPortrayal2D
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
Modifier and TypeFieldDescriptiondouble
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, fieldPortrayal, gui, location, parent, precise, scale, selected
-
Constructor Summary
ConstructorDescriptionTrailDrawInfo2D
(RectangularShape draw, RectangularShape clip, Point2D.Double secondPoint, DrawInfo2D parent) TrailDrawInfo2D
(DrawInfo2D other, double translateX, double translateY, Point2D.Double secondPoint) TrailDrawInfo2D
(DrawInfo2D other, Point2D.Double secondPoint) TrailDrawInfo2D
(EdgeDrawInfo2D other) -
Method Summary
Methods inherited from class sim.portrayal.network.EdgeDrawInfo2D
toString
-
Field Details
-
value
public double valueA value from 1.0 to 0.0 indicating how far "back in time" this segment is supposed to be.
-
-
Constructor Details
-
TrailDrawInfo2D
public TrailDrawInfo2D(RectangularShape draw, RectangularShape clip, Point2D.Double secondPoint, DrawInfo2D parent) -
TrailDrawInfo2D
public TrailDrawInfo2D(DrawInfo2D other, double translateX, double translateY, Point2D.Double secondPoint) -
TrailDrawInfo2D
-
TrailDrawInfo2D
-