summaryrefslogtreecommitdiffstats
path: root/voronoi/cVertex.java
blob: 17041415651f3c37faf6af5d8fb30870d5ccdf41 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package voronoi;
class cVertex {
    
  cVertex prev, next;
  cPointi v;
  boolean ear = false;
  int vnum;
  cEdge duplicate;
  boolean  onhull;		
  boolean  mark;

  cVertex() {
    prev = next = null;
    v = new cPointi();
    vnum = 0;
    duplicate = null;
    onhull = false;
    mark = false;
  }

  cVertex(int i, int j) {	
    v = new cPointi();
    v.x = i;
    v.y = j;
    v.z = i * i + j*  j;
    prev = next = null;
  }

  cVertex(int x, int y, int z) {
    v = new cPointi();
    v.x = x;
    v.y = y;
    v.z = z;
    prev = next = null;
  }

  public void ResetVertex3D()
  {
    v.z = v.x * v.x + v.y * v.y;
  }
  
}