1 package org.opentrafficsim.animation.data;
2
3 import org.djunits.value.vdouble.scalar.Speed;
4 import org.djutils.draw.point.OrientedPoint2d;
5 import org.opentrafficsim.base.geometry.OtsBounds2d;
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
33 @Override
34 public OrientedPoint2d getLocation()
35 {
36 return this.speedSign.getLocation();
37 }
38
39
40 @Override
41 public OtsBounds2d getBounds()
42 {
43 return this.speedSign.getBounds();
44 }
45
46
47 @Override
48 public Speed getSpeed()
49 {
50 return this.speedSign.getSpeed();
51 }
52
53
54
55
56
57 public SpeedSign getSpeedSign()
58 {
59 return this.speedSign;
60 }
61
62
63 @Override
64 public String toString()
65 {
66 return "Speed sign " + this.speedSign.getId();
67 }
68
69 }