// top
- tile.newT(ltf, mtf, mtn);
- tile.newT(mtn, ltn, ltf);
- tile.newT(mtf, rtf, rtn);
- tile.newT(rtn, mtn, mtf);
+ tile.newT(ltf, mtf, mtn, null);
+ tile.newT(mtn, ltn, ltf, null);
+ tile.newT(mtf, rtf, rtn, null);
+ tile.newT(rtn, mtn, mtf, null);
// bottom (swap normals)
- tile.newT(mbf, lbf, mbn);
- tile.newT(lbn, mbn, lbf);
- tile.newT(rbf, mbf, rbn);
- tile.newT(mbn, rbn, mbf);
+ tile.newT(mbf, lbf, mbn, null);
+ tile.newT(lbn, mbn, lbf, null);
+ tile.newT(rbf, mbf, rbn, null);
+ tile.newT(mbn, rbn, mbf, null);
// left
- tile.newT(ltf, ltn, lbn);
- tile.newT(lbn, lbf, ltf);
+ tile.newT(ltf, ltn, lbn, null);
+ tile.newT(lbn, lbf, ltf, null);
// right (swap normals)
- tile.newT(rtn, rtf, rbn);
- tile.newT(rbf, rbn, rtf);
+ tile.newT(rtn, rtf, rbn, null);
+ tile.newT(rbf, rbn, rtf, null);
// front
- tile.newT(ltn, mtn, mbn);
- tile.newT(ltn, mbn, lbn);
- tile.newT(mtn, rtn, rbn);
- tile.newT(mtn, rbn, mbn);
+ tile.newT(ltn, mtn, mbn, null);
+ tile.newT(ltn, mbn, lbn, null);
+ tile.newT(mtn, rtn, rbn, null);
+ tile.newT(mtn, rbn, mbn, null);
// back
- tile.newT(mtf, ltf, mbf);
- tile.newT(mbf, ltf, lbf);
- tile.newT(rtf, mtf, rbf);
- tile.newT(rbf, mtf, mbf);
+ tile.newT(mtf, ltf, mbf, null);
+ tile.newT(mbf, ltf, lbf, null);
+ tile.newT(rtf, mtf, rbf, null);
+ tile.newT(rbf, mtf, mbf, null);
for(Matrix m : translations) {
for(Mesh.T t1 : tile) {
for(Mesh.T t2 : tile) {
if (t1==t2) continue;
- if ((t1.p1().p.times(m).minus(t2.p1().p).mag() < Mesh.EPSILON) &&
- (t1.p2().p.times(m).minus(t2.p3().p).mag() < Mesh.EPSILON) &&
- (t1.p3().p.times(m).minus(t2.p2().p).mag() < Mesh.EPSILON)) {
+ if ((t1.v1().p.times(m).minus(t2.v1().p).mag() < Mesh.EPSILON) &&
+ (t1.v2().p.times(m).minus(t2.v3().p).mag() < Mesh.EPSILON) &&
+ (t1.v3().p.times(m).minus(t2.v2().p).mag() < Mesh.EPSILON)) {
t1.e1().bind(t2.e3().pair);
t1.e2().bind(t2.e2().pair);
t1.e3().bind(t2.e1().pair);
}
- if ((t1.p2().p.times(m).minus(t2.p1().p).mag() < Mesh.EPSILON) &&
- (t1.p3().p.times(m).minus(t2.p3().p).mag() < Mesh.EPSILON) &&
- (t1.p1().p.times(m).minus(t2.p2().p).mag() < Mesh.EPSILON)) {
+ if ((t1.v2().p.times(m).minus(t2.v1().p).mag() < Mesh.EPSILON) &&
+ (t1.v3().p.times(m).minus(t2.v3().p).mag() < Mesh.EPSILON) &&
+ (t1.v1().p.times(m).minus(t2.v2().p).mag() < Mesh.EPSILON)) {
t1.e2().bind(t2.e3().pair);
t1.e3().bind(t2.e2().pair);
t1.e1().bind(t2.e1().pair);
}
- if ((t1.p3().p.times(m).minus(t2.p1().p).mag() < Mesh.EPSILON) &&
- (t1.p1().p.times(m).minus(t2.p3().p).mag() < Mesh.EPSILON) &&
- (t1.p2().p.times(m).minus(t2.p2().p).mag() < Mesh.EPSILON)) {
+ if ((t1.v3().p.times(m).minus(t2.v1().p).mag() < Mesh.EPSILON) &&
+ (t1.v1().p.times(m).minus(t2.v3().p).mag() < Mesh.EPSILON) &&
+ (t1.v2().p.times(m).minus(t2.v2().p).mag() < Mesh.EPSILON)) {
t1.e3().bind(t2.e3().pair);
t1.e1().bind(t2.e2().pair);
t1.e2().bind(t2.e1().pair);
*/
if (mesh==goal)
- for(Mesh.Vert p : new Mesh.Vert[] { t.p1(), t.p2(), t.p3() }) {
+ for(Mesh.Vert p : new Mesh.Vert[] { t.v1(), t.v2(), t.v3() }) {
p.p.glVertex(gl);
//p.plus(p.norm().times(p.score()*10)).glVertex(gl);
p.partner().p.glVertex(gl);
glcanvas.repaint();
//tile.ts.get(Math.abs(random.nextInt()) % tile.ts.size()).e1().p1
for(Mesh.T t : tile)
- for(Mesh.Vert p : new Mesh.Vert[] { t.p1(), t.p2(), t.p3() }) {
+ for(Mesh.Vert p : new Mesh.Vert[] { t.v1(), t.v2(), t.v3() }) {
rand(10,p);
}
goal.rescore();