use of maspack.render.GL.GLViewer in project artisynth_core by artisynth.
the class Main method createViewerFrame.
public GLViewerFrame createViewerFrame() {
GLViewerFrame frame = new GLViewerFrame(myViewer, PROJECT_NAME, 400, 400);
GLViewer viewer = frame.getViewer();
// ViewerToolBar toolBar = new ViewerToolBar(viewer, this);
AxisAngle REW = getDefaultViewOrientation(getRootModel());
myViewerManager.addViewer(viewer);
ViewerToolBar toolBar = new ViewerToolBar(viewer, /*addGridPanel=*/
true);
frame.getContentPane().add(toolBar, BorderLayout.PAGE_START);
viewer.setDefaultAxialView(AxisAlignedRotation.getNearest(new RotationMatrix3d(REW)));
initializeViewer(viewer, REW);
frame.setVisible(true);
return frame;
}
use of maspack.render.GL.GLViewer in project artisynth_core by artisynth.
the class MenuBarHandler method updateWidgets.
public void updateWidgets() {
// frame is being set visible can cause some problems
if (!myFrame.isVisible()) {
return;
}
GLViewer v = getMainViewer();
boolean gridOn = v.getGridVisible();
GLGridPlane grid = v.getGrid();
if ((myGridDisplay != null) != gridOn) {
if (gridOn) {
myGridDisplay = GridDisplay.createAndAdd(grid, myToolBar, myGridDisplayIndex);
} else {
GridDisplay.removeAndDispose(myGridDisplay, myToolBar, myGridDisplayIndex);
myGridDisplay = null;
}
}
if (myGridDisplay != null) {
myGridDisplay.updateWidgets();
}
}
use of maspack.render.GL.GLViewer in project artisynth_core by artisynth.
the class ViewerManager method render.
public void render() {
// System.out.println("vm_render");
myRenderList = buildRenderList();
for (GLViewer v : myViewers) {
v.setExternalRenderList(myRenderList);
v.rerender();
}
}
use of maspack.render.GL.GLViewer in project artisynth_core by artisynth.
the class ViewerManager method setEllipticSelection.
/**
* Set whether or not elliptic selection is enabled in all the viewers.
*
* @param enable
* Whether or not elliptic selection is enabled.
*/
public void setEllipticSelection(boolean enable) {
ellipticSelectionP = enable;
for (GLViewer v : myViewers) {
v.setEllipticSelection(enable);
v.setEllipticCursorActive(enable);
}
}
use of maspack.render.GL.GLViewer in project artisynth_core by artisynth.
the class ViewerManager method resetEllipticCursorSize.
public void resetEllipticCursorSize() {
for (GLViewer v : myViewers) {
v.resetEllipticCursorSize();
v.repaint();
}
}
Aggregations