X-Git-Url: http://git.megacz.com/?p=anneal.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fqfat%2FInteractiveMeshViewer.java;h=ed238032db23e0dbf999db83a34215437471ce8c;hp=1a72d7ebb2d6f5bb1a1d3fa3bf190704c79d91ff;hb=076fc38f95ee874e4bb01e03cb1021f5d137f35e;hpb=2a2e64829786ee415fd0c0f16957c55e174b793b diff --git a/src/edu/berkeley/qfat/InteractiveMeshViewer.java b/src/edu/berkeley/qfat/InteractiveMeshViewer.java index 1a72d7e..ed23803 100644 --- a/src/edu/berkeley/qfat/InteractiveMeshViewer.java +++ b/src/edu/berkeley/qfat/InteractiveMeshViewer.java @@ -13,7 +13,26 @@ import edu.berkeley.qfat.geom.Point; public class InteractiveMeshViewer extends MeshViewer { - public InteractiveMeshViewer(JFrame f) { super(f); } + public Mesh tile; + public Mesh goal; + public InteractiveMeshViewer(JFrame f) { + super(f); + setTile(new Mesh(false)); + setGoal(new Mesh(false)); + } + + public void setTile(Mesh tile) { + removeMesh(this.tile); + this.tile = tile; + addMesh(this.tile); + } + public void setGoal(Mesh goal) { + removeMesh(this.goal); + this.goal = goal; + goal.option_selectable = false; + goal.option_wireframe = true; + addMesh(this.goal); + } public synchronized void dump() { try { @@ -35,6 +54,26 @@ public class InteractiveMeshViewer extends MeshViewer { } catch (Exception e) { throw new RuntimeException(e); } } + public int whichNeighbor = 1; + public double temp; + public boolean tileon = true; + public boolean tilemeshon = false; + public boolean goalon = true; + public boolean anneal = false; + public boolean hillclimb = false; + public boolean neighbors = false; + public boolean neighborsWire = false; + public boolean neighborsWireOne = false; + public boolean errorNormals = false; + + public boolean force = false; + public Mesh.Vertex[] points; + public int breaks = 0; + + public int temps; + public int accepts; + public int vertss; + public void keyPressed(KeyEvent e) { super.keyPressed(e); switch(e.getKeyCode()) {