View Javadoc
1   package org.opentrafficsim.animation.data;
2   
3   import org.djutils.draw.line.Polygon2d;
4   import org.opentrafficsim.core.network.Node;
5   import org.opentrafficsim.draw.network.NodeAnimation.NodeData;
6   
7   /**
8    * Animation data of a Node.
9    * <p>
10   * Copyright (c) 2023-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
11   * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
12   * </p>
13   * @author <a href="https://github.com/wjschakel">Wouter Schakel</a>
14   */
15  public class AnimationNodeData extends AnimationIdentifiableShape<Node> implements NodeData
16  {
17  
18      /**
19       * Constructor.
20       * @param node node.
21       */
22      public AnimationNodeData(final Node node)
23      {
24          super(node);
25      }
26  
27      @Override
28      public Polygon2d getAbsoluteContour()
29      {
30          throw new UnsupportedOperationException("Nodes do not have a drawable contour.");
31      }
32  
33      @Override
34      public Polygon2d getRelativeContour()
35      {
36          throw new UnsupportedOperationException("Nodes do not have a drawable contour.");
37      }
38  
39      @Override
40      public String toString()
41      {
42          return "Node " + getId();
43      }
44  
45  }