X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2FGeom.java;h=9c639e153179dd42a7b1f85fb671d3b181dbc7d0;hb=a18e40f15c9b054cdd16c3a5416a36a10033b632;hp=fec07b576244af63cc7daec946b0b22fc77aba1f;hpb=77132d13c4434fa3e320d4516e98c1d8a7df21cc;p=anneal.git diff --git a/src/Geom.java b/src/Geom.java index fec07b5..9c639e1 100644 --- a/src/Geom.java +++ b/src/Geom.java @@ -1,92 +1,79 @@ import java.awt.*; +import java.util.*; import java.awt.event.*; import javax.swing.*; import javax.media.opengl.*; import javax.media.opengl.glu.*; -public class Geom implements GLEventListener { +public class Geom implements Iterable { - public static StlFile stlf = null; + private HashMap ps = new HashMap(); + private HashMap es = new HashMap(); + private HashSet ts = new HashSet(); - /** - * Take care of initialization here. - */ - public void init(GLAutoDrawable gld) { - GL gl = gld.getGL(); - GLU glu = new GLU(); - gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - gl.glViewport(0, 0, 500, 300); - gl.glMatrixMode(GL.GL_PROJECTION); - gl.glLoadIdentity(); - //glu.gluOrtho2D(0.0, 500.0, 0.0, 300.0); - display(gld); - } - - - /** - * Take care of drawing here. - */ - public void display(GLAutoDrawable drawable) { - float red = 0.0f; - float green = 0.0f; - float blue = 0.0f; - GL gl = drawable.getGL(); - gl.glClear(GL.GL_COLOR_BUFFER_BIT); - gl.glPointSize(5.0f); + public Iterator iterator() { return ts.iterator(); } - for(int i=0; i