parent
498539a09e
commit
331097648e
@ -1,12 +1,21 @@ |
||||
package sig; |
||||
|
||||
public class Triangle { |
||||
Vertex A; |
||||
Vertex B; |
||||
Vertex C; |
||||
public Triangle(Vertex a, Vertex b, Vertex c) { |
||||
Vector A; |
||||
Vector B; |
||||
Vector C; |
||||
Vector2 T; |
||||
Vector2 U; |
||||
Vector2 V; |
||||
public Triangle(Vector a, Vector b, Vector c) { |
||||
this(a,b,c,new Vector2(),new Vector2(),new Vector2()); |
||||
} |
||||
public Triangle(Vector a, Vector b, Vector c, Vector2 t, Vector2 u, Vector2 v) { |
||||
A = a; |
||||
B = b; |
||||
C = c; |
||||
T = t; |
||||
U = u; |
||||
V = v; |
||||
} |
||||
} |
||||
|
@ -1,17 +1,17 @@ |
||||
package sig; |
||||
|
||||
public class Vertex { |
||||
public class Vector { |
||||
float x,y,z,w; |
||||
|
||||
public Vertex() { |
||||
public Vector() { |
||||
this(0,0,0,1); |
||||
} |
||||
|
||||
public Vertex(float x, float y, float z) { |
||||
public Vector(float x, float y, float z) { |
||||
this(x,y,z,1); |
||||
} |
||||
|
||||
public Vertex(float x, float y, float z,float w) { |
||||
public Vector(float x, float y, float z,float w) { |
||||
this.x = x; |
||||
this.y = y; |
||||
this.z = z; |
@ -0,0 +1,19 @@ |
||||
package sig; |
||||
|
||||
public class Vector2 { |
||||
float u,v,w; |
||||
|
||||
public Vector2() { |
||||
this(0,0,1); |
||||
} |
||||
|
||||
public Vector2(float u, float v) { |
||||
this(u,v,1); |
||||
} |
||||
|
||||
public Vector2(float y, float v, float w) { |
||||
this.u=u; |
||||
this.v=v; |
||||
this.w=w; |
||||
} |
||||
} |
Loading…
Reference in new issue