Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ArrayList<Point3D> vrcholy;
- ArrayList<Integer> hrany;
- Renderer r;
- Camera c;
- double azimut, zenit;
- Mat4 anim = new Mat4Identity();
- int mX, mY;
- boolean pressed;
- public void draw(){
- int index1, index2, x1,y1,z1,x2,y2,z2;
- out.clearScreen();
- anim = anim.mul(new Mat4RotXYZ(0.001, 0.002, 0.003));
- r.setModel(anim);
- for (int i = 0; i < hrany.size(); i+=2) {
- index1=hrany.get(i).intValue();
- index2=hrany.get(i+1).intValue();
- x1=(int)vrcholy.get(index1).x;
- y1=(int)vrcholy.get(index1).y;
- z1=(int)vrcholy.get(index1).z;
- x2=(int)vrcholy.get(index2).x;
- y2=(int)vrcholy.get(index2).y;
- z2=(int)vrcholy.get(index2).z;
- r.drawLine(new Point3D(x1,y1,z1), new Point3D(x2,y2,z2));
- out.getGraphics().drawLine(x1, y1, x2, y2);
- }
Advertisement
Add Comment
Please, Sign In to add comment