/** * Returns the location in world space of the point (x, y) on the screen. * * @param x x coordinate in the image * @param y y coordinate in the image * @return true if there is an object at x, y , false otherwise */ public boolean getPoint(int x, int y, double xyz[]) { if (renderer.bufferg == false) { renderer.bufferg = true; isDamage = true; } return renderer.getPoint(x, y, xyz); }
/** * Listens for mouse release and controls aspects of the renderer. A release in the upper left * corner toggles {@link Renderer#tableMode}. A release in the upper right corner toggle * visibility of the {@link Material#table}display. When true, the current material table is * displayed in the upper left corner of the window. Position of the mouse determines current * material. A release in the lower right toggles {@link Renderer#showMesh} * * @param event Event * @param x current x coordinate * @param y current y coordinate * @return true */ public boolean mouseUp(int x, int y) { Renderer.setDragging(false); if (x < 35 && y < 35) { Renderer.tableMode = !Renderer.tableMode; } if (x > W - 35 && y < 35) { seeMaterial = !seeMaterial; renderer.bufferg = !renderer.bufferg; damage(); } if (x > W - 35 && y > H - 35) { renderer.showMesh = !renderer.showMesh; damage(); } return true; }