1 package org.opentrafficsim.editor.extensions.map;
2
3 import org.djunits.value.vdouble.scalar.Length;
4 import org.djutils.draw.line.PolyLine2d;
5 import org.djutils.draw.line.Polygon2d;
6 import org.opentrafficsim.draw.road.StripeAnimation.StripeData;
7 import org.opentrafficsim.editor.XsdTreeNode;
8 import org.opentrafficsim.road.network.lane.SliceInfo;
9
10
11
12
13
14
15
16
17
18 public class MapStripeData extends MapCrossSectionData implements StripeData
19 {
20
21
22 private final Type type;
23
24
25 private final Length width;
26
27
28 private final Length startOffset;
29
30
31
32
33
34
35
36
37
38
39
40 public MapStripeData(final Type type, final Length width, final Length startOffset, final XsdTreeNode linkNode,
41 final PolyLine2d centerLine, final Polygon2d contour, final SliceInfo sliceInfo)
42 {
43 super(linkNode, centerLine, contour, sliceInfo);
44 this.type = type;
45 this.width = width;
46 this.startOffset = startOffset;
47 }
48
49
50 @Override
51 public PolyLine2d getCenterLine()
52 {
53 return this.centerLine;
54 }
55
56
57 @Override
58 public Type getType()
59 {
60 return this.type;
61 }
62
63
64 @Override
65 public Length getWidth()
66 {
67 return this.width;
68 }
69
70
71 @Override
72 public String toString()
73 {
74 return "Stripe " + getLinkId() + " " + this.startOffset;
75 }
76
77 }