public static Matriz3D projPerspectiva(float d) { Matriz3D r = new Matriz3D(); r.Identidade(); r.set_m(2, 2, 0); r.set_m(3, 2, (1 / d)); return(r); }
public static Matriz3D translacao(float tx, float ty, float tz) { Matriz3D r = new Matriz3D(); r.Identidade(); r.set_m(0, 3, tx); r.set_m(1, 3, ty); r.set_m(2, 3, tz); return(r); }
public static Matriz3D escala(float sx, float sy, float sz) { Matriz3D r = new Matriz3D(); r.Identidade(); r.set_m(0, 0, sx); r.set_m(1, 1, sy); r.set_m(2, 2, sz); return(r); }
public static Matriz3D rotacaoZ(float theta) { theta = (float)(Math.PI / 180) * theta; Matriz3D r = new Matriz3D(); r.Identidade(); r.set_m(0, 0, (float)Math.Cos((double)theta)); r.set_m(0, 1, -(float)Math.Sin((double)theta)); r.set_m(1, 0, (float)Math.Sin((double)theta)); r.set_m(1, 1, (float)Math.Cos((double)theta)); return(r); }
public static Matriz3D projParalela() { Matriz3D r = new Matriz3D(); r.Identidade(); r.set_m(2, 2, 0); return(r); }