+ tile.newT(mtf, ltf, mbf, null, 6);
+ tile.newT(mbf, ltf, lbf, null, 6);
+ tile.newT(rtf, mtf, rbf, null, 6);
+ tile.newT(rbf, mtf, mbf, null, 6);
+*/
+ /*
+ HashSet<Mesh.E> es = new HashSet<Mesh.E>();
+ for(Mesh.T t : tile) {
+ es.add(t.e1());
+ es.add(t.e2());
+ es.add(t.e3());
+ }
+ for(Mesh.E e : es) {
+ if (e.p1.p.x == e.p2.p.x && e.p1.p.y == e.p2.p.y) continue;
+ if (e.p1.p.z == e.p2.p.z && e.p1.p.y == e.p2.p.y) continue;
+ if (e.p1.p.x == e.p2.p.x && e.p1.p.z == e.p2.p.z) continue;
+ e.shatter();
+ }
+ */
+
+
+ height = 4;
+ width = 4;
+ depth = 1;
+
+ Matrix mm = Matrix.scale(0.1f);
+ // top
+ quad(tile, mm,
+ new Point( 2, 2, 0),
+ new Point( 1, 1, -1),
+ new Point(-1, 1, -1),
+ new Point(-2, 2, 0));
+ quad(tile, mm,
+ new Point(-2, 2, 0),
+ new Point(-1, 1, 1),
+ new Point( 1, 1, 1),
+ new Point( 2, 2, 0));
+ quad(tile, mm,
+ new Point( 1, 1, -1),
+ new Point( 1, 1, 1),
+ new Point(-1, 1, 1),
+ new Point(-1, 1, -1));
+
+ // bottom
+ quad(tile, mm,
+ new Point(-2, -2, 0),
+ new Point(-1, -1, -1),
+ new Point( 1, -1, -1),
+ new Point( 2, -2, 0));
+ quad(tile, mm,
+ new Point( 2, -2, 0),
+ new Point( 1, -1, 1),
+ new Point(-1, -1, 1),
+ new Point(-2, -2, 0));
+ quad(tile, mm,
+ new Point(-1, -1, -1),
+ new Point(-1, -1, 1),
+ new Point( 1, -1, 1),
+ new Point( 1, -1, -1));
+
+ // left
+ quad(tile, mm,
+ new Point( 2, -2, 0),
+ new Point( 1, -1, -1),
+ new Point( 1, 1, -1),
+ new Point( 2, 2, 0));
+ quad(tile, mm,
+ new Point( 2, 2, 0),
+ new Point( 1, 1, 1),
+ new Point( 1, -1, 1),
+ new Point( 2, -2, 0));
+ quad(tile, mm,
+ new Point( 1, -1, -1),
+ new Point( 1, -1, 1),
+ new Point( 1, 1, 1),
+ new Point( 1, 1, -1));
+
+ // bottom
+ quad(tile, mm,
+ new Point(-2, 2, 0),
+ new Point(-1, 1, -1),
+ new Point(-1, -1, -1),
+ new Point(-2, -2, 0));
+ quad(tile, mm,
+ new Point(-2, -2, 0),
+ new Point(-1, -1, 1),
+ new Point(-1, 1, 1),
+ new Point(-2, 2, 0));
+ quad(tile, mm,
+ new Point(-1, 1, -1),
+ new Point(-1, 1, 1),
+ new Point(-1, -1, 1),
+ new Point(-1, -1, -1));
+
+
+
+ translations = new Matrix[] {
+
+ Matrix.translate(new Vec(0, 0.2f,0))
+ .times(Matrix.rotate(new Vec(0,1,0), (float)(1*Math.PI/2))),
+
+ Matrix.translate(new Vec(0,-0.2f,0))
+ .times(Matrix.rotate(new Vec(0,1,0), (float)(1*Math.PI/2))),
+
+ Matrix.translate(new Vec( 0.2f,0,0))
+ .times(Matrix.rotate(new Vec(1,0,0), (float)(-1*Math.PI/2))),
+
+ Matrix.translate(new Vec(-0.2f,0,0))
+ .times(Matrix.rotate(new Vec(1,0,0), (float)(-1*Math.PI/2))),
+
+
+ /*
+ Matrix.rotate(new Vec(0,0,1), (float)(1*Math.PI/2)),
+ Matrix.rotate(new Vec(0,0,1), (float)(2*Math.PI/2)),
+ Matrix.rotate(new Vec(0,0,1), (float)(3*Math.PI/2)),
+
+ Matrix.rotate(new Vec(1,0,0), (float)(2*Math.PI/2)),
+ */
+ //Matrix.rotate(new Vec(0,0,1), (float)(2*Math.PI/2)),
+ //Matrix.scale(1,-1,1),
+
+ //Matrix.translate(new Vec( 0.2f, 0,0))
+ //.times(Matrix.rotate(new Vec(0,0,1), (float)( 1*Math.PI/2)))
+ //.times(Matrix.rotate(new Vec(0,1,0), (float)( 3*Math.PI/2))),
+
+ //Matrix.translate(new Vec(-0.2f, 0,0))
+ //.times(Matrix.rotate(new Vec(0,0,1), (float)( 3*Math.PI/2)))
+ //.times(Matrix.rotate(new Vec(0,1,0), (float)( 3*Math.PI/2))),
+
+ //Matrix.rotate(new Vec(0,0,1), (float)( 0*Math.PI/2))
+ //.times(Matrix.translate(new Vec(0, -0.2f, 0)))
+ //.times(Matrix.rotate(new Vec(0,1,0), (float)( 1*Math.PI/2))),
+ //Matrix.rotate(new Vec(0,0,1), (float)( 1*Math.PI/2))
+ //.times(Matrix.translate(new Vec(0, -0.2f, 0)))
+ //.times(Matrix.rotate(new Vec(0,1,0), (float)( 1*Math.PI/2))),
+
+ //Matrix.rotate(new Vec(0,0,1), (float)( 0*Math.PI/2))
+ //.times(Matrix.translate(new Vec(0, -0.2f, 0)))
+ //.times(Matrix.rotate(new Vec(0,1,0), (float)( 1*Math.PI/2))),
+ //Matrix.rotate(new Vec(0,0,1), (float)( 0*Math.PI/2))
+ //.times(Matrix.translate(new Vec(0, -0.2f, 0)))
+ //.times(Matrix.rotate(new Vec(0,1,0), (float)( 1*Math.PI/2))),
+
+ Matrix.ONE,
+ };
+