public class MeshViewer extends JPanel implements GLEventListener, MouseListener, MouseMotionListener, KeyListener, MouseWheelListener {
public class MeshViewer extends JPanel implements GLEventListener, MouseListener, MouseMotionListener, KeyListener, MouseWheelListener {
private float tz = 0;
private float anglex = 0;
private float angley = 0;
private Mesh.Vertex closest = null;
private float tz = 0;
private float anglex = 0;
private float angley = 0;
private Mesh.Vertex closest = null;
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) { }
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) { }
public synchronized void init(GLAutoDrawable gld) {
GL gl = glcanvas.getGL();//gld.getGL();
gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
public synchronized void init(GLAutoDrawable gld) {
GL gl = glcanvas.getGL();//gld.getGL();
gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
+ if (main != null && main.whichNeighbor>0 && main.transforms!=null && !mesh.option_wireframe) {
+ mesh.option_wireframe = true;
+ mesh.render(gl, main.transforms[main.whichNeighbor-1]);
+ mesh.option_wireframe = false;
+ }
+ }
if ((e.getModifiersEx() & MouseEvent.SHIFT_DOWN_MASK) != 0) {
if (closest != null && projection != null) {
synchronized(this) {
if ((e.getModifiersEx() & MouseEvent.SHIFT_DOWN_MASK) != 0) {
if (closest != null && projection != null) {
synchronized(this) {