1 package org.opentrafficsim.animation.data;
2
3 import org.djunits.value.vdouble.scalar.Speed;
4 import org.djutils.draw.line.Polygon2d;
5 import org.djutils.draw.point.OrientedPoint2d;
6 import org.opentrafficsim.draw.road.SpeedSignAnimation.SpeedSignData;
7 import org.opentrafficsim.road.network.lane.object.SpeedSign;
8
9
10
11
12
13
14
15
16
17 public class AnimationSpeedSignData implements SpeedSignData
18 {
19
20
21 private final SpeedSign speedSign;
22
23
24
25
26
27 public AnimationSpeedSignData(final SpeedSign speedSign)
28 {
29 this.speedSign = speedSign;
30 }
31
32 @Override
33 public OrientedPoint2d getLocation()
34 {
35 return this.speedSign.getLocation();
36 }
37
38 @Override
39 public Polygon2d getContour()
40 {
41 return this.speedSign.getContour();
42 }
43
44 @Override
45 public Speed getSpeed()
46 {
47 return this.speedSign.getSpeed();
48 }
49
50
51
52
53
54 public SpeedSign getSpeedSign()
55 {
56 return this.speedSign;
57 }
58
59 @Override
60 public String toString()
61 {
62 return "Speed sign " + this.speedSign.getId();
63 }
64
65 }