View Javadoc

1   package nl.tudelft.goal.ut2004.visualizer.map;
2   
3   import cz.cuni.amis.pogamut.base3d.worldview.object.Location;
4   import java.awt.Color;
5   
6   import nl.tudelft.goal.ut2004.visualizer.timeline.map.GlColor;
7   
8   
9   /**
10   * Structure holding info for one vertex of blended polygon.
11   * Only color and position (in worldspace) for now.
12   * @author Honza
13   */
14  public class BlendVertex {
15      /**
16       * Color of vertex
17       */
18      protected GlColor color;
19  
20      /**
21       * Location of vertex in worldspace
22       */
23      protected Location location;
24  
25      public BlendVertex(Location location, Color color) {
26          this.location = location;
27          this.color = new GlColor(color);
28      }
29  
30      public BlendVertex(Location location, GlColor color) {
31          this.location = location;
32          this.color = new GlColor(color);
33      }
34  
35      /**
36       * Return color of vertex.
37       * @return color instance, not a copy. Change in will reflect in vertex.
38       */
39      public GlColor getColor() {
40          return color;
41      }
42  
43      /**
44       * Return location of vertex
45       * @return actual location instance, not a copy. Changes made to the location
46       *         will reflext in the vertex
47       */
48      public Location getLocation() {
49          return location;
50      }
51  }