View Javadoc

1   package nl.tudelft.goal.ut2004.visualizer.map;
2   
3   import nl.tudelft.goal.ut2004.visualizer.timeline.map.GlColor;
4   import cz.cuni.amis.pogamut.base3d.worldview.object.Location;
5   
6   /**
7    * Storage structure used during blending phase of rendering.
8    * Stores triangle in worldview with necessary info. For now only colors
9    *
10   * Only triangle to make sorting and possible intersections easy. Poly may be more fitting.
11   * 
12   * @author Honza
13   */
14  public class BlendTriangle {
15      /**
16       * Vertex of triangle.
17       */
18      protected BlendVertex[] verts;
19  
20      public BlendTriangle() {
21          verts = new BlendVertex[3];
22      }
23  
24      /**
25       * Return actual collection of vers, not a copy
26       */
27      public BlendVertex[] getVerts() {
28          return verts;
29      }
30  
31      /**
32       * Create new BlendVertex for vertex i of poly.
33       * @param i index of vertex, from zero to num of verts
34       * @param location location fo vertex
35       * @param color color f vertex
36       */
37      public void setVertex(int i, Location location, GlColor color) {
38          verts[i] = new BlendVertex(location, color);
39      }
40  }