projects
/
anneal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
checkpoint
[anneal.git]
/
src
/
edu
/
berkeley
/
qfat
/
MeshViewer.java
diff --git
a/src/edu/berkeley/qfat/MeshViewer.java
b/src/edu/berkeley/qfat/MeshViewer.java
index
b1f0e52
..
b0ed97b
100644
(file)
--- a/
src/edu/berkeley/qfat/MeshViewer.java
+++ b/
src/edu/berkeley/qfat/MeshViewer.java
@@
-12,10
+12,10
@@
import edu.berkeley.qfat.geom.Point;
public class MeshViewer implements GLEventListener, MouseListener, MouseMotionListener, KeyListener, MouseWheelListener {
public class MeshViewer implements GLEventListener, MouseListener, MouseMotionListener, KeyListener, MouseWheelListener {
- public Mesh tile = new Mesh();
- public Mesh goal = new Mesh();
+ public Mesh tile = new Mesh(false);
+ public Mesh goal = new Mesh(false);
public Matrix[] translations;
public Matrix[] translations;
- public Mesh.Vert[] points;
+ public Mesh.Vertex[] points;
public boolean tileon = true;
public boolean tileon = true;
@@
-54,7
+54,7
@@
public class MeshViewer implements GLEventListener, MouseListener, MouseMotionLi
Vec normal = t.norm();
pw.println("facet normal " + normal.x + " " + normal.y + " " + normal.z);
pw.println(" outer loop");
Vec normal = t.norm();
pw.println("facet normal " + normal.x + " " + normal.y + " " + normal.z);
pw.println(" outer loop");
- for(Mesh.Vert v : new Mesh.Vert[] { t.v1(), t.v2(), t.v3() }) {
+ for(Mesh.Vertex v : new Mesh.Vertex[] { t.v1(), t.v2(), t.v3() }) {
pw.println(" vertex " + v.p.x + " " + v.p.y + " " + v.p.z);
}
pw.println(" endloop");
pw.println(" vertex " + v.p.x + " " + v.p.y + " " + v.p.z);
}
pw.println(" endloop");
@@
-217,6
+217,7
@@
public class MeshViewer implements GLEventListener, MouseListener, MouseMotionLi
float red = 0.0f;
float green = 0.0f;
float blue = 0.0f;
float red = 0.0f;
float green = 0.0f;
float blue = 0.0f;
+ synchronized(safeTriangles) {
for(Mesh.T t : tris) {
if (red < 0.15) red = 1.0f;
if (green < 0.15) green = 1.0f;
for(Mesh.T t : tris) {
if (red < 0.15) red = 1.0f;
if (green < 0.15) green = 1.0f;
@@
-266,7
+267,7
@@
public class MeshViewer implements GLEventListener, MouseListener, MouseMotionLi
*/
/*
if (mesh==goal)
*/
/*
if (mesh==goal)
- for(Mesh.Vert p : new Mesh.Vert[] { t.v1(), t.v2(), t.v3() }) {
+ for(Mesh.Vertex p : new Mesh.Vertex[] { t.v1(), t.v2(), t.v3() }) {
gl.glDisable(GL.GL_LIGHTING);
gl.glBegin(GL.GL_LINES);
gl.glColor3f(1, 1, 1);
gl.glDisable(GL.GL_LIGHTING);
gl.glBegin(GL.GL_LINES);
gl.glColor3f(1, 1, 1);
@@
-279,7
+280,7
@@
public class MeshViewer implements GLEventListener, MouseListener, MouseMotionLi
}
*/
gl.glEnd();
}
*/
gl.glEnd();
-
+ }
}
}
}
}