Render a triangle
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
982384af66
commit
41505dada8
@ -6,7 +6,7 @@ import java.awt.event.MouseListener;
|
|||||||
import java.awt.event.MouseMotionListener;
|
import java.awt.event.MouseMotionListener;
|
||||||
|
|
||||||
public class SigRenderer implements MouseListener,MouseMotionListener{
|
public class SigRenderer implements MouseListener,MouseMotionListener{
|
||||||
Vector3d vec;
|
Triangle tri;
|
||||||
public final static int SCREEN_WIDTH=1280;
|
public final static int SCREEN_WIDTH=1280;
|
||||||
public final static int SCREEN_HEIGHT=720;
|
public final static int SCREEN_HEIGHT=720;
|
||||||
public final static long TIMEPERTICK = 16666667l;
|
public final static long TIMEPERTICK = 16666667l;
|
||||||
@ -17,8 +17,8 @@ public class SigRenderer implements MouseListener,MouseMotionListener{
|
|||||||
}
|
}
|
||||||
|
|
||||||
SigRenderer(JFrame f) {
|
SigRenderer(JFrame f) {
|
||||||
vec = new Vector3d();
|
tri = new Triangle(new Vector3D(),new Vector3D(),new Vector3D());
|
||||||
System.out.println(vec);
|
System.out.println(tri);
|
||||||
|
|
||||||
Panel p = new Panel();
|
Panel p = new Panel();
|
||||||
|
|
||||||
|
14
src/sig/Triangle.java
Normal file
14
src/sig/Triangle.java
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package sig;
|
||||||
|
|
||||||
|
public class Triangle {
|
||||||
|
Vector3D A,B,C;
|
||||||
|
Triangle(Vector3D A,Vector3D B,Vector3D C) {
|
||||||
|
this.A=A;
|
||||||
|
this.B=B;
|
||||||
|
this.C=C;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Triangle [A=" + A + ", B=" + B + ", C=" + C + "]";
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user