import edu.berkeley.qfat.bind.*;
import edu.berkeley.qfat.geom.*;
import edu.berkeley.qfat.stl.*;
+import edu.berkeley.qfat.voxel.*;
import edu.berkeley.qfat.geom.Point;
import edu.berkeley.qfat.geom.Polygon;
+/*
+
+
+Todo
+- review catmull-clark; move vertex points?
+- re-anneal fish
+
+- show constraints (?)
+- show in red if user tries to move a point to an illegal location
+
+- eliminate use of bindinggroupschanged()
+
+- post qfat on my software page
+
+
+With Sequin
+- constraints admit intersections (lattice)
+- constraints may be transformed linearly
+
+
+
+
+Log console
+ - blend-shaded overlay? slick.
+
+face/vertex count
+rendering FPS
+ability to not draw edges between faces
+
+
+three circumcircles showing crystal ball -- these don't get scaled
+axes?
+
+drawing modes:
+ - bounding box
+ - vertices
+ - edges
+ - visible-edges
+ - flat with or without edges
+ - shaded with or without edges
+ * contrasting-faces
+
+
+quadric decimation?
+
+show normals
+show bounding box
+show axes (big+fat)
+ */
+
// TO DO:
//
// - Ability to snap three views to orthgonal
public void hit() {}
}
+ public void marchingCubes() {
+ Mesh mesh = new Mesh(false);
+ mesh.coalesce = true;
+ MarchingCubes.march(new SampledField() {
+ public float getSample(Point p) {
+ double x = p.x;
+ double y = p.y;
+ double z = p.z;
+ x-=0.7;
+ y-=0.7;
+ z-=0.7;
+ return (float)Math.sqrt(x*x+y*y+z*z);
+ }
+ },
+ 0.8, 20, 0.1, mesh);
+ setTile(mesh);
+ //fixupTile();
+ }
+
public void hexBrick(boolean offset, boolean rotated) {
setTile(new Mesh(false));
float width = (float)0.8;
};
fixupTile();
}}});
+ tileMenu.add(new MyMenuItem("Marching Cubes") { public void hit() {
+ marchingCubes();
+ }});
// Finally, add all the menus to the menu bar.
add(tileMenu);
- add(goalMenu);
- add(hideMenu);
+ //add(goalMenu);
+ //add(hideMenu);
}
}
f.setLayout(new BorderLayout());
Main main = new Main(f);
f.add(main, BorderLayout.CENTER);
- f.setJMenuBar(main.new MyMenuBar());
+
+ f.addWindowListener(new WindowListener() {
+ public void windowActivated(WindowEvent e) { }
+ public void windowClosed(WindowEvent e) { System.exit(0); }
+ public void windowClosing(WindowEvent e) { System.exit(0); }
+ public void windowDeactivated(WindowEvent e) { }
+ public void windowDeiconified(WindowEvent e) { }
+ public void windowIconified(WindowEvent e) { }
+ public void windowOpened(WindowEvent e) { }
+ });
+
f.pack();
f.show();
f.setSize(900, 900);
f.doLayout();
+
+ JFrame f2 = new JFrame();
+ f2.setJMenuBar(main.new MyMenuBar());
+ f2.setSize(100,100);
+ f2.show();
+
main.anneal();
}