|
|
@ -10,6 +10,7 @@ public class Triangle { |
|
|
|
public long nextRenderTime = -1l; |
|
|
|
public long nextRenderTime = -1l; |
|
|
|
public long nextRenderTime2 = -1l; |
|
|
|
public long nextRenderTime2 = -1l; |
|
|
|
public Triangle unmodifiedTri; |
|
|
|
public Triangle unmodifiedTri; |
|
|
|
|
|
|
|
public int dir = -1; |
|
|
|
public Triangle() { |
|
|
|
public Triangle() { |
|
|
|
this(new Vector(),new Vector(),new Vector()); |
|
|
|
this(new Vector(),new Vector(),new Vector()); |
|
|
|
} |
|
|
|
} |
|
|
@ -32,6 +33,7 @@ public class Triangle { |
|
|
|
targetTriangle.tex=this.tex; |
|
|
|
targetTriangle.tex=this.tex; |
|
|
|
targetTriangle.b=this.b; |
|
|
|
targetTriangle.b=this.b; |
|
|
|
targetTriangle.unmodifiedTri=this.unmodifiedTri; |
|
|
|
targetTriangle.unmodifiedTri=this.unmodifiedTri; |
|
|
|
|
|
|
|
targetTriangle.dir=this.dir; |
|
|
|
} |
|
|
|
} |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected Object clone(){ |
|
|
|
protected Object clone(){ |
|
|
@ -40,12 +42,12 @@ public class Triangle { |
|
|
|
t.tex=tex; |
|
|
|
t.tex=tex; |
|
|
|
t.b=b; |
|
|
|
t.b=b; |
|
|
|
t.unmodifiedTri=unmodifiedTri; |
|
|
|
t.unmodifiedTri=unmodifiedTri; |
|
|
|
|
|
|
|
t.dir=dir; |
|
|
|
return t; |
|
|
|
return t; |
|
|
|
} |
|
|
|
} |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public String toString() { |
|
|
|
public String toString() { |
|
|
|
return "Triangle [A=" + A + ", B=" + B + ", C=" + C + ", T=" + T + ", U=" + U + ", V=" + V + ", col=" + col |
|
|
|
return "Triangle [A=" + A + ", B=" + B + ", C=" + C + ", T=" + T + ", U=" + U + ", V=" + V + ", col=" + col + ", dir=" + dir + "]"; |
|
|
|
+ "]"; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
public int getColor() { |
|
|
|
public int getColor() { |
|
|
|
return col; |
|
|
|
return col; |
|
|
@ -106,6 +108,7 @@ public class Triangle { |
|
|
|
out_tri[0].tex = in.tex; |
|
|
|
out_tri[0].tex = in.tex; |
|
|
|
out_tri[0].b=in.b; |
|
|
|
out_tri[0].b=in.b; |
|
|
|
out_tri[0].unmodifiedTri=in.unmodifiedTri; |
|
|
|
out_tri[0].unmodifiedTri=in.unmodifiedTri; |
|
|
|
|
|
|
|
out_tri[0].dir=in.dir; |
|
|
|
out_tri[0].A = inside_points[0]; |
|
|
|
out_tri[0].A = inside_points[0]; |
|
|
|
out_tri[0].T = inside_tex[0]; |
|
|
|
out_tri[0].T = inside_tex[0]; |
|
|
|
out_tri[0].B = Vector.IntersectPlane(plane_p, plane_n, inside_points[0], outside_points[0],t); |
|
|
|
out_tri[0].B = Vector.IntersectPlane(plane_p, plane_n, inside_points[0], outside_points[0],t); |
|
|
@ -123,6 +126,7 @@ public class Triangle { |
|
|
|
out_tri[0].col=out_tri[1].col=in.col; |
|
|
|
out_tri[0].col=out_tri[1].col=in.col; |
|
|
|
out_tri[0].tex=out_tri[1].tex=in.tex; |
|
|
|
out_tri[0].tex=out_tri[1].tex=in.tex; |
|
|
|
out_tri[0].b=out_tri[1].b=in.b; |
|
|
|
out_tri[0].b=out_tri[1].b=in.b; |
|
|
|
|
|
|
|
out_tri[0].dir=out_tri[1].dir=in.dir; |
|
|
|
out_tri[0].unmodifiedTri=out_tri[1].unmodifiedTri=in.unmodifiedTri; |
|
|
|
out_tri[0].unmodifiedTri=out_tri[1].unmodifiedTri=in.unmodifiedTri; |
|
|
|
out_tri[0].A = inside_points[0]; |
|
|
|
out_tri[0].A = inside_points[0]; |
|
|
|
out_tri[0].B = inside_points[1]; |
|
|
|
out_tri[0].B = inside_points[1]; |
|
|
|